Total Complexity | 5 |
Total Lines | 18 |
Duplicated Lines | 0 % |
1 | import unittest |
||
18 | class coalaDbusTest(unittest.TestCase): |
||
19 | |||
20 | def setUp(self): |
||
21 | self.glib_main_loop = GLib.MainLoop |
||
22 | GLib.MainLoop = GlibMainLoopTest |
||
23 | |||
24 | def tearDown(self): |
||
25 | GLib.MainLoop = self.glib_main_loop |
||
26 | |||
27 | def test_main(self): |
||
28 | # Ensure we are able to setup dbus and create a mainloop |
||
29 | with self.assertRaises(AssertionError): |
||
30 | coala_dbus.main() |
||
31 | |||
32 | with self.assertRaises(SystemExit): |
||
33 | coala_dbus.sys_clean_exit() |
||
34 | |||
35 | self.assertGreater(coala_dbus.on_disconnected(), 0) |
||
36 |