Skip to content

Commit

Permalink
test: Test serialization of dataset document field
Browse files Browse the repository at this point in the history
  • Loading branch information
bellisk committed Sep 14, 2023
1 parent 0347e5e commit f9114be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ def test_graph_from_dataset(self):
for keyword in keywords:
assert self._triple(g, dataset_ref, DCAT.keyword, Literal(keyword, lang=key))

# Documentation
eq_(len([t for t in g.triples((dataset_ref, FOAF.page, None))]), 2)
for documentation_link in dataset['documentation']:
assert self._triple(g, dataset_ref, FOAF.page, URIRef(documentation_link))

# List
for item in [
('language', DCT.language, Literal),
# ('documentation', FOAF.page, URIRef, FOAF.Document),
]:
values = json.loads(extras[item[0]])
eq_(len([t for t in g.triples((dataset_ref, item[1], None))]), len(values))
Expand Down

0 comments on commit f9114be

Please sign in to comment.