Exemplo n.º 1
0
    def teardown_class(cls):
        helpers.reset_db()
        model.repo.rebuild_db()
        ckan.lib.search.clear_all()

        config.clear()
        config.update(cls.original_config)
Exemplo n.º 2
0
    def teardown_class(cls):
        config.clear()
        config.update(cls._original_config)
        new_authz.clear_auth_functions_cache()
        PylonsTestCase.teardown_class()

        model.repo.rebuild_db()
Exemplo n.º 3
0
    def teardown_class(cls):
        plugins.unload('example_idatasetform_v4')
        helpers.reset_db()
        ckan.lib.search.clear_all()

        config.clear()
        config.update(cls.original_config)
Exemplo n.º 4
0
    def teardown_class(cls):
        config.clear()
        config.update(cls._original_config)
        new_authz.clear_auth_functions_cache()
        PylonsTestCase.teardown_class()

        model.repo.rebuild_db()
Exemplo n.º 5
0
    def teardown_class(cls):
        model.Session.remove()
        # model.repo.rebuild_db()

        config.clear()
        config.update(cls.original_config)
        logic._actions['package_create'] = original_package_create
Exemplo n.º 6
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
     model.repo.rebuild_db()
     # Reenable Solr indexing
     if (sys.version_info[0] == 2 and sys.version_info[1] == 6
             and not p.plugin_loaded('synchronous_search')):
         p.load('synchronous_search')
Exemplo n.º 7
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
     model.repo.rebuild_db()
     # Reenable Solr indexing
     if (sys.version_info[0] == 2 and sys.version_info[1] == 6
             and not p.plugin_loaded('synchronous_search')):
         p.load('synchronous_search')
Exemplo n.º 8
0
        def wrapper(*args, **kwargs):
            _original_config = config.copy()
            config[key] = value

            return_value = func(*args, **kwargs)

            config.clear()
            config.update(_original_config)

            return return_value
Exemplo n.º 9
0
        def wrapper(*args, **kwargs):
            _original_config = config.copy()
            config[key] = value

            return_value = func(*args, **kwargs)

            config.clear()
            config.update(_original_config)

            return return_value
Exemplo n.º 10
0
        def wrapper(*args, **kwargs):
            _original_config = config.copy()
            config[key] = value
            new_authz.clear_auth_functions_cache()

            return_value = func(*args, **kwargs)

            config.clear()
            config.update(_original_config)
            new_authz.clear_auth_functions_cache()

            return return_value
Exemplo n.º 11
0
        def wrapper(*args, **kwargs):
            _original_config = config.copy()
            config[key] = value
            new_authz.clear_auth_functions_cache()

            return_value = func(*args, **kwargs)

            config.clear()
            config.update(_original_config)
            new_authz.clear_auth_functions_cache()

            return return_value
Exemplo n.º 12
0
    def test_profiles_via_config_option(self):

        original_config = config.copy()

        config[RDF_PROFILES_CONFIG_OPTION] = 'profile_conf_1 profile_conf_2'
        try:
            RDFParser()
        except RDFProfileException as e:

            eq_(str(e), 'Unknown RDF profiles: profile_conf_1, profile_conf_2')

        config.clear()
        config.update(original_config)
Exemplo n.º 13
0
    def test_profiles_via_config_option(self):

        original_config = config.copy()

        config[RDF_PROFILES_CONFIG_OPTION] = 'profile_conf_1 profile_conf_2'
        try:
            RDFParser()
        except RDFProfileException as e:

            eq_(str(e), 'Unknown RDF profiles: profile_conf_1, profile_conf_2')

        config.clear()
        config.update(original_config)
Exemplo n.º 14
0
 def teardown_class(cls):
     # Restore the Pylons config to its original values, in case any tests
     # changed any config settings.
     config.clear()
     config.update(cls._original_config)
Exemplo n.º 15
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
     model.repo.rebuild_db()
Exemplo n.º 16
0
 def teardown_class(cls):
     # Restore the Pylons config to its original values, in case any tests
     # changed any config settings.
     config.clear()
     config.update(cls._original_config)
Exemplo n.º 17
0
    def teardown_class(cls):
        model.Session.remove()
        model.repo.rebuild_db()

        config.clear()
        config.update(cls.original_config)
Exemplo n.º 18
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
Exemplo n.º 19
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     config.clear()
     config.update(cls._original_config)
Exemplo n.º 20
0
    def teardown_class(cls):
        config.clear()
        config.update(cls._original_config)
        PylonsTestCase.teardown_class()

        model.repo.rebuild_db()
Exemplo n.º 21
0
 def teardown_class(self):
     config.clear()
     config.update(self._original_config)
     mock_mail_server.SmtpServerHarness.teardown_class()
     pylons_controller.PylonsTestCase.teardown_class()
     model.repo.rebuild_db()
Exemplo n.º 22
0
 def teardown_class(cls):
     helpers.rebuild_all_dbs(cls.Session)
     p.unload('datastore')
     config.clear()
     config.update(cls._original_config)
Exemplo n.º 23
0
    def teardown_class(cls):
        config.clear()
        config.update(cls._original_config)

        model.repo.rebuild_db()
Exemplo n.º 24
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
     CreateTestData.delete()
Exemplo n.º 25
0
 def teardown_class(self):
     config.clear()
     config.update(self._original_config)
     mock_mail_server.SmtpServerHarness.teardown_class()
     pylons_controller.PylonsTestCase.teardown_class()
     model.repo.rebuild_db()
Exemplo n.º 26
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
Exemplo n.º 27
0
    def teardown_class(cls):
        config.clear()
        config.update(cls._original_config)
        PylonsTestCase.teardown_class()

        model.repo.rebuild_db()
Exemplo n.º 28
0
 def teardown_class(cls):
     config.clear()
     config.update(cls._original_config)
     plugins.reset()
     create_test_data.CreateTestData.delete()