Skip to content

Commit

Permalink
tests: Test dataset documentation mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
bellisk committed Sep 13, 2023
1 parent 66ae289 commit 2db5223
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckanext/dcatapchharvest/tests/fixtures/1901.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@
<dcat:keyword xml:lang="it">basi-statistiche-e-presentazioni-generali</dcat:keyword>
<dct:title xml:lang="fr">Annuaire statistique de la Suisse 1901</dct:title>
<dcat:keyword xml:lang="de">statistische-grundlagen-und-ubersichten</dcat:keyword>
<foaf:page>
<foaf:Document rdf:about="https://example.com/documentation-dataset-1"/>
</foaf:page>
<foaf:page>
<foaf:Document rdf:about="https://example.com/documentation-dataset-2"/>
</foaf:page>
</dcat:Dataset>
</rdf:RDF>
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def test_dataset_all_fields(self):
# Lists
eq_(sorted(dataset['language']), [u'de', u'fr'])
eq_(sorted(dataset['groups']), [{'name': u'statistical-basis'}])
eq_(
sorted(dataset['documentation']),
['https://example.com/documentation-dataset-1', 'https://example.com/documentation-dataset-2']
)

# Dataset URI
eq_(extras['uri'], u'https://opendata.swiss/dataset/7451e012-64b2-4bbc-af20-a0e2bc61b585')
Expand Down

0 comments on commit 2db5223

Please sign in to comment.