7
class TestDbus(unittest.TestCase):
10
self.system_bus = dbus.SystemBus()
11
self.iface = dbus.Interface(
12
self.system_bus.get_object("com.ubuntu.SystemService","/"),
13
"com.ubuntu.SystemService")
15
def test_is_package_system_locked(self):
16
# just check if it not raises
17
res = self.iface.is_package_system_locked()
18
self.assertTrue( res in [True, False] )
20
def test_is_reboot_required(self):
21
# just check that it does not raise
22
res = self.iface.is_reboot_required()
23
self.assertTrue( res in [True, False] )
25
def test_get_proxy(self):
26
for proto in ["http", "https", "ftp"]:
27
res = self.iface.get_proxy(proto)
28
# ensure we get a string
29
self.assertTrue( isinstance(res, dbus.String) )
33
if __name__ == "__main__":