Skip to content

Commit

Permalink
Merge branch 'master' into 56-add-schema-file-dcat-ap-2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jun 10, 2024
2 parents 15b0cc1 + 83495ba commit da8de09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions ckanext/dcat/tests/test_harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def wrapper(plugin_name):
return wrapper


class TestRDFHarvester(p.SingletonPlugin):

p.implements(IDCATRDFHarvester)
class BaseTestRDFHarvester(object):

calls = defaultdict(int)
# change return values of after_parsing via this parameter
Expand Down Expand Up @@ -111,8 +109,14 @@ def update_package_schema_for_update(self, package_schema):
return package_schema


class TestRDFNullHarvester(TestRDFHarvester):
class TestRDFHarvester(p.SingletonPlugin, BaseTestRDFHarvester):

p.implements(IDCATRDFHarvester)


class TestRDFNullHarvester(p.SingletonPlugin, BaseTestRDFHarvester):
p.implements(IDCATRDFHarvester)

def before_update(self, harvest_object, dataset_dict, temp_dict):
super(TestRDFNullHarvester, self).before_update(harvest_object, dataset_dict, temp_dict)
dataset_dict.clear()
Expand All @@ -122,7 +126,7 @@ def before_create(self, harvest_object, dataset_dict, temp_dict):
dataset_dict.clear()


class TestRDFExceptionHarvester(TestRDFHarvester):
class TestRDFExceptionHarvester(p.SingletonPlugin, BaseTestRDFHarvester):
p.implements(IDCATRDFHarvester)

raised_exception = False
Expand Down Expand Up @@ -1498,7 +1502,6 @@ def test_harvest_import_extensions_point_gets_called(self, reset_calls_counter):
status=405, content_type=content_type)

harvest_source = self._create_harvest_source(url)

# First run, will create two datasets as previously tested
self._run_full_job(harvest_source['id'], num_objects=2)

Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
responses==0.20.0
responses>=0.25.2
mock
pytest-ckan
pytest-cov

0 comments on commit da8de09

Please sign in to comment.