def test_loads_from_an_array_of_classes(self, mock_serve):
     service_wrapper.main(['cmd_name'], [mock.MagicMock])
     mock_serve.assert_called_with(
         bus_class=dbus.SystemBus,
         bus_name=constants.BUS_NAME,
         object_classes=[mock.MagicMock]
     )
Exemplo n.º 2
0
 def test_loads_from_an_array_of_classes(self, mock_serve):
     service_wrapper.main(['cmd_name'], [mock.MagicMock])
     mock_serve.assert_called_with(
         bus_class=dbus.SystemBus,
         bus_name=constants.BUS_NAME,
         object_classes=[mock.MagicMock]
     )
 def test_loads_an_object_class(self, mock_serve):
     # Just use some class we have available
     service_wrapper.main(['cmd_name', 'mock.MagicMock'])
     mock_serve.assert_called_with(
         bus_class=dbus.SystemBus,
         bus_name=constants.BUS_NAME,
         object_classes=[mock.MagicMock]
     )
Exemplo n.º 4
0
 def test_loads_an_object_class(self, mock_serve):
     # Just use some class we have available
     service_wrapper.main(['cmd_name', 'mock.MagicMock'])
     mock_serve.assert_called_with(
         bus_class=dbus.SystemBus,
         bus_name=constants.BUS_NAME,
         object_classes=[mock.MagicMock]
     )
Exemplo n.º 5
0
def main():
    try:
        object_classes = [
            objects.ConfigDBusObject, objects.RegisterDBusObject,
            objects.AttachDBusObject, objects.ProductsDBusObject,
            objects.UnregisterDBusObject, objects.EntitlementDBusObject,
            objects.Main
        ]
        sys.exit(service_wrapper.main(sys.argv, object_classes=object_classes))
    except Exception:
        log.exception("DBus service startup failed")
def main():
    try:
        object_classes = [
            base.AllFacts,
        ]
        sys.exit(
            service_wrapper.main(sys.argv,
                                 object_classes=object_classes,
                                 default_bus_name=constants.FACTS_DBUS_NAME))
    except Exception:
        log.exception("DBus service startup failed")
Exemplo n.º 7
0
def main():
    try:
        object_classes = [
            objects.ConfigDBusObject,
            objects.RegisterDBusObject,
            objects.AttachDBusObject,
            objects.ProductsDBusObject,
            objects.UnregisterDBusObject,
            objects.EntitlementDBusObject,
            objects.Main
        ]
        sys.exit(service_wrapper.main(sys.argv, object_classes=object_classes))
    except Exception:
        log.exception("DBus service startup failed")