def test_uses_default_bus_name(self): opts, args = service_wrapper.parse_argv(['cmd_name', 'Foo'], 'Default') self.assertFalse(opts.verbose) self.assertEqual(opts.bus, dbus.SystemBus) self.assertEqual(opts.bus_name, 'Default') self.assertEqual(args, ['Foo'])
def test_loads_bus_given(self): opts, args = service_wrapper.parse_argv(['cmd_name', '--bus', 'dbus.SessionBus', 'Foo'], 'Default') self.assertEqual(opts.bus, dbus.SessionBus)
def test_loads_bus_given(self): opts, args = service_wrapper.parse_argv( ["cmd_name", "--bus", "dbus.SessionBus", "Foo"], "Default") self.assertEqual(opts.bus, dbus.SessionBus)
def test_parse_argv(self): opts, args = service_wrapper.parse_argv( ['cmd_name', '--verbose', '--bus-name', 'Hello', 'Foo'], 'Default') self.assertTrue(opts.verbose) self.assertEqual(opts.bus_name, 'Hello') self.assertEqual(args, ['Foo'])
def test_uses_default_bus_name(self): opts, args = service_wrapper.parse_argv(["cmd_name", "Foo"], "Default") self.assertFalse(opts.verbose) self.assertEqual(opts.bus, dbus.SystemBus) self.assertEqual(opts.bus_name, "Default") self.assertEqual(args, ["Foo"])
def test_parse_argv(self): opts, args = service_wrapper.parse_argv( ["cmd_name", "--verbose", "--bus-name", "Hello", "Foo"], "Default") self.assertTrue(opts.verbose) self.assertEqual(opts.bus_name, "Hello") self.assertEqual(args, ["Foo"])
def test_loads_bus_given(self): opts, args = service_wrapper.parse_argv( ['cmd_name', '--bus', 'dbus.SessionBus', 'Foo'], 'Default') self.assertEqual(opts.bus, dbus.SessionBus)