Logo Search packages:      
Sourcecode: jockey version File versions  Download package

def ui::UITest::test_enable (   self  ) 

calling with --enable

Definition at line 195 of file ui.py.

00195                          :
        '''calling with --enable'''

        open (os.path.join(OSLib.inst.handler_dir, 'h.py'), 'w').write(
            sandbox.h_availability_py)
        
        # disable mint driver and verify that in --list
        sys.argv = ['ui-test', '--list']
        ui = sandbox.TestUI()
        for h in ui.handlers:
            if h.id() == 'kmod:mint':
                h.disable()
                break
        self.assertEqual(ui.run(), 0)

        # enable it using the CLI
        sys.argv = ['ui-test', '--enable', 'kmod:mint']
        ui = sandbox.TestUI()
        self.assertEqual(ui.run(), 0)

        self.stop_capture()

        mint_disabled = False
        for l in self.stdout.strip().splitlines():
            if l.startswith('kmod:mint'):
                if ui.string_disabled in l:
                    mint_disabled = True
                break
        self.assert_(mint_disabled)

        for h in ui.handlers:
            self.assert_(h.enabled())

    def test_enable_invalid(self):


Generated by  Doxygen 1.6.0   Back to index