def __init__(self): self.global_provider = config_provider.getProviderByName( setting.GLOBAL_CONFIG_PROVIDER) self.cluster_provider = config_provider.getProviderByName( setting.CLUSTER_CONFIG_PROVIDER) self.host_provider = config_provider.getProviderByName( setting.HOST_CONFIG_PROVIDER)
def test_found_provider(self): config_provider.registerProvider(DummyProvider) provider = config_provider.getProviderByName(DummyProvider.NAME) self.assertIsInstance(provider, DummyProvider)