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)
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)
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)
def setUp(self): plugins.unload_all() plugins.load(self.PluginObserverPlugin) self.PluginObserverPlugin().reset_calls()
def _plugin_teardown(_saved_plugins_config): plugins.unload_all() config['ckan.plugins'] = _saved_plugins_config plugins.load_all(config)
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)
def teardown_method(self): plugins.unload_all()
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)