Skip to content

Commit

Permalink
Don't use a core plugin for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Sep 6, 2024
1 parent 7b58e79 commit 9b6bae7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ckanext/envvars/tests/test_base_envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
import mock


class MockPluginEnvVars(p.SingletonPlugin):
pass


class TestEnvVarToIni(object):

def test_envvartoini_expected_output(self):
Expand Down Expand Up @@ -217,14 +221,14 @@ def test_plugins_loaded(self):
New plugins defined in CKAN__PLUGINS are loaded by ckanext-envvars
'''

assert not p.plugin_loaded("image_view")
assert not p.plugin_loaded("mock_envvars_plugin")

combined_list = [
('CKAN__PLUGINS', 'image_view envvars'),
('CKAN__PLUGINS', 'mock_envvars_plugin envvars'),
]

self._setup_env_vars(combined_list)

assert p.plugin_loaded("image_view")
assert p.plugin_loaded("mock_envvars_plugin")

self._teardown_env_vars(combined_list)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@
entry_points='''
[ckan.plugins]
envvars=ckanext.envvars.plugin:EnvvarsPlugin
mock_envvars_plugin=ckanext.envvars.tests.test_base_envvars:MockPluginEnvVars
''',
)

0 comments on commit 9b6bae7

Please sign in to comment.