def setUp(self):
     self.loader = LoaderNamespace()
     self.loader.register_namespace('logging', 'logging')
     self.loader.register_namespace('sc', 'service_client')
     self.loader.register_namespace('sc-plugins', 'service_client.plugins')
     self.loader.register_namespace('here', __name__)
     register_logging_factories(self.loader)
     register_service_client_factories(self.loader)
Beispiel #2
0
def create_loader(namespaces=None, factory_registers=None):
    default_namespaces = {
        'blueprint': 'maehtrobot.blueprints',
        'core': 'maehtrobot.blueprints.core',
        'common': 'maehtrobot.common'
    }

    if namespaces:
        default_namespaces.update(namespaces)

    loader = LoaderNamespaceReversedCached(default_namespaces)

    register_logging_factories(loader)
    register_blueprints_factories(loader)

    try:
        for factory_register in factory_registers:
            factory_register(loader)
    except TypeError:
        pass

    return loader
Beispiel #3
0
 def prepare_class_loader(self):
     register_logging_factories(self.class_loader)
Beispiel #4
0
 def setUp(self):
     self.loader = LoaderNamespace()
     self.loader.register_namespace('logging', 'logging')
     register_logging_factories(self.loader)