Esempio n. 1
0
 def teardown_class(cls):
     plugins.unload_all()
     config['ckan.plugins'] = cls._saved_plugins_config
     if plugins.toolkit.check_ckan_version(min_version='2.6.0'):
         plugins.load_all()
     else:
         plugins.load_all(config)
Esempio n. 2
0
 def teardown_class(cls):
     plugins.unload_all()
     config['ckan.plugins'] = cls._saved_plugins_config
     if plugins.toolkit.check_ckan_version(min_version='2.6.0'):
         plugins.load_all()
     else:
         plugins.load_all(config)
Esempio n. 3
0
 def setup_class(cls):
     reset_db()
     plugins.unload_all()
     cls._saved_plugins_config = config.get('ckan.plugins', '')
     config['ckan.plugins'] = 'archiver'
     if plugins.toolkit.check_ckan_version(min_version='2.6.0'):
         plugins.load_all()
     else:
         plugins.load_all(config)
Esempio n. 4
0
 def setup_class(cls):
     reset_db()
     plugins.unload_all()
     cls._saved_plugins_config = config.get('ckan.plugins', '')
     config['ckan.plugins'] = 'archiver'
     if plugins.toolkit.check_ckan_version(min_version='2.6.0'):
         plugins.load_all()
     else:
         plugins.load_all(config)
Esempio n. 5
0
def test_plugins_load(monkeypatch):
    monkeypatch.setitem(config, "ckan.plugins", "action_plugin")
    plugins.load_all()
    # synchronous_search automatically gets loaded
    current_plugins = set([
        plugins.get_plugin(p)
        for p in ["action_plugin", "synchronous_search"] +
        find_system_plugins()
    ])
    assert set(plugins.core._PLUGINS_SERVICE.values()) == current_plugins
    plugins.unload_all()
 def teardown_class(cls):
     plugins.unload_all()
     config['ckan.plugins'] = cls._saved_plugins_config
     plugins.load_all(config)
 def setup_class(cls):
     plugins.unload_all()
     cls._saved_plugins_config = config.get('ckan.plugins', '')
     config['ckan.plugins'] = 'archiver'
     plugins.load_all(config)
Esempio n. 8
0
 def setUp(self):
     plugins.unload_all()
     plugins.load(self.PluginObserverPlugin)
     self.PluginObserverPlugin().reset_calls()
Esempio n. 9
0
 def _plugin_teardown(_saved_plugins_config):
     plugins.unload_all()
     config['ckan.plugins'] = _saved_plugins_config
     plugins.load_all(config)
Esempio n. 10
0
 def setUp(self):
     plugins.unload_all()
     plugins.load(self.PluginObserverPlugin)
     self.PluginObserverPlugin().reset_calls()
Esempio n. 11
0
 def tearDown(self):
     # Ideally this would remove the ckantestplugin_dist from the working
     # set, but I can't find a way to do that in setuptools.
     plugins.unload_all()
     config['ckan.plugins'] = self._saved_plugins_config
     plugins.load_all(config)
Esempio n. 12
0
 def _plugin_teardown(_saved_plugins_config):
     plugins.unload_all()
     config['ckan.plugins'] = _saved_plugins_config
     plugins.load_all(config)
Esempio n. 13
0
 def teardown_class(cls):
     plugins.unload_all()
     config['ckan.plugins'] = cls._saved_plugins_config
     plugins.load_all(config)
Esempio n. 14
0
 def setup_class(cls):
     plugins.unload_all()
     cls._saved_plugins_config = config.get('ckan.plugins', '')
     config['ckan.plugins'] = 'archiver'
     plugins.load_all(config)
Esempio n. 15
0
 def tearDown(self):
     # Ideally this would remove the ckantestplugin_dist from the working
     # set, but I can't find a way to do that in setuptools.
     plugins.unload_all()
     config['ckan.plugins'] = self._saved_plugins_config
     plugins.load_all(config)
Esempio n. 16
0
 def teardown_method(self):
     plugins.unload_all()
Esempio n. 17
0
 def setup_class(cls):
     reset_db()
     plugins.unload_all()
     cls._saved_plugins_config = config.get("ckan.plugins", "")
     config["ckan.plugins"] = "archiver"
     plugins.load_all(config)