Skip to content

Commit

Permalink
test: enable plugins when using clean_db
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Nov 2, 2023
1 parent ad4d083 commit 66b609e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckanext/harvest/logic/auth/create.py
Expand Up @@ -35,7 +35,7 @@ def harvest_job_create(context, data_dict):

context['package'] = pkg
try:
pt.check_access('package_update', context, data_dict)
pt.check_access('package_update', context, {"id": source_id})
return {'success': True}
except pt.NotAuthorized:
return {'success': False,
Expand Down
4 changes: 2 additions & 2 deletions ckanext/harvest/tests/harvesters/test_base.py
Expand Up @@ -13,7 +13,7 @@
_ensure_name_is_unique = HarvesterBase._ensure_name_is_unique


@pytest.mark.usefixtures('clean_db', 'clean_index')
@pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index')
class TestGenNewName(object):

def test_basic(self):
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_config_override(self):
assert HarvesterBase._gen_new_name('Trees', append_type='number-sequence') == 'trees1'


@pytest.mark.usefixtures('clean_db', 'clean_index')
@pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index')
class TestEnsureNameIsUnique(object):

def test_no_existing_datasets(self):
Expand Down
2 changes: 1 addition & 1 deletion ckanext/harvest/tests/test_blueprint.py
Expand Up @@ -5,7 +5,7 @@
from ckanext.harvest.tests import factories as harvest_factories


@pytest.mark.usefixtures('clean_db', 'clean_index')
@pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index')
class TestBlueprint():

def test_index_page_is_rendered(self, app):
Expand Down

0 comments on commit 66b609e

Please sign in to comment.