コード例 #1
0
    def test_requires_namespace(self):
        class NoNameSpace(TemporaryGlobalConfigurable):
            def configure(self, **options):
                return options

        default_object = NoNameSpace.create_global()
        config_ready.reach()
コード例 #2
0
    def test_requires_namespace(self):
        class NoNameSpace(TemporaryGlobalConfigurable):
            def configure(self, **options):
                return options

        default_object = NoNameSpace.create_global()
        config_ready.reach()
コード例 #3
0
    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
コード例 #4
0
    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
コード例 #5
0
    def test_requires_configure_implementation(self):
        class NoConfig(TemporaryGlobalConfigurable):
            CONFIG_NAMESPACE = 'fake.'

        default_object = NoConfig.create_global()
        config_ready.reach()
コード例 #6
0
    def test_requires_configure_implementation(self):
        class NoConfig(TemporaryGlobalConfigurable):
            CONFIG_NAMESPACE = 'fake.'

        default_object = NoConfig.create_global()
        config_ready.reach()