def test_requires_namespace(self): class NoNameSpace(TemporaryGlobalConfigurable): def configure(self, **options): return options default_object = NoNameSpace.create_global() config_ready.reach()
def test_gets_configured_on_config_ready(self): class Configurable(TemporaryGlobalConfigurable): CONFIG_NAMESPACE = 'fake.' _CONFIGURED = [] def configure(self, **options): self._CONFIGURED.append(True) default_object = Configurable.create_global() config_ready.reach() assert len(Configurable._CONFIGURED) == 1
def test_requires_configure_implementation(self): class NoConfig(TemporaryGlobalConfigurable): CONFIG_NAMESPACE = 'fake.' default_object = NoConfig.create_global() config_ready.reach()