Skip to content

Commit 3192e85

Browse files
committed
feat: Test also publisher as foaf:Agent
1 parent 01f9da2 commit 3192e85

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

ckanext/dcatapchharvest/tests/fixtures/conformant/dataset-publisher.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
<dcat:Dataset rdf:about="https://swisstopo/123">
88
<dct:identifier>346265-fr@bundesamt-fur-statistik-bfs</dct:identifier>
99
<dct:publisher>
10-
<foaf:Organization rdf:about="https://swisstopo">
11-
<foaf:name xml:lang="de">Landesamt Topographie Swisstopo</foaf:name>
12-
</foaf:Organization>
10+
<foaf:Agent rdf:about="http://orgs.vocab.org/some-org">
11+
<foaf:name xml:lang="de">Wirtschaftsamt</foaf:name>
12+
<foaf:name xml:lang="it">Ufficio economico</foaf:name>
13+
<foaf:name xml:lang="fr">Bureau des economiques</foaf:name>
14+
<foaf:mbox rdf:resource="mailto:wirtschaftsamt@sh.ch"/>
15+
<foaf:homepage rdf:resource="https://some-org.org/info"/>
16+
</foaf:Agent>
1317
</dct:publisher>
14-
1518
</dcat:Dataset>
16-
1719
</rdf:RDF>

ckanext/dcatapchharvest/tests/test_dcatap_ch_parse_conformant_rdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ def test_dcatap_conformant_publisher_import(self):
2222
p.parse(contents)
2323
dataset = [d for d in p.datasets()][0]
2424
publisher = json.loads(dataset['publisher'])
25-
eq_(publisher['name'], 'Landesamt Topographie Swisstopo')
26-
eq_(publisher['url'], 'https://swisstopo')
25+
eq_(publisher['name'], {'fr': 'Bureau des economiques', 'de': 'Wirtschaftsamt', 'en': '', 'it': 'Ufficio economico'})
26+
eq_(publisher['url'], 'https://some-org.org/info')

0 commit comments

Comments
 (0)