Skip to content

Commit

Permalink
tests: Fix test to work for all three resources in dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
bellisk committed Nov 7, 2023
1 parent 7f00bdc commit 1d27e13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ def test_graph_from_dataset(self):
for link in resource_dict.get("documentation", []):
assert self._triple(g, distribution, FOAF.page, URIRef(link))

eq_(len([t for t in g.triples((distribution, DCAT.accessService, None))]), 2)
for link in distribution.get("access_services", []):
eq_(
len([t for t in g.triples((distribution, DCAT.accessService, None))]),
len(resource_dict.get("access_services", []))
)
for link in resource_dict.get("access_services", []):
assert self._triple(g, distribution, DCAT.accessService, URIRef(link))

# e2c50e70-67ad-4f86-bb1b-3f93867eadaa
Expand Down

0 comments on commit 1d27e13

Please sign in to comment.