Skip to content

Commit 63f0b2e

Browse files
committed
tests: Test serialization of resource issued and modified
1 parent 76e9896 commit 63f0b2e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ckanext/dcatapchharvest/tests/fixtures/dataset.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@
123123
],
124124
"rights": "Creative Commons Zero 1.0 Universell (CC0 1.0)",
125125
"license": "NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired",
126-
"format": "CSV"
126+
"format": "CSV",
127+
"issued": "2015-06-26T15:21:09.034694",
128+
"modified": "2015-06-30T15:21:09.000000"
127129
},
128130
{
129131
"id": "28e75e40-e1a1-497b-a1b9-8c1834d60201",

ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ def test_graph_from_dataset(self):
161161
expected_literal = Literal("P1D", datatype=XSD.duration)
162162
assert self._triple(g, distribution, DCAT.temporalResolution, expected_literal)
163163

164+
if resource_dict.get('issued'):
165+
assert self._triple(g, distribution, DCT.issued, resource_dict["issued"], XSD.dateTime)
166+
167+
if resource_dict.get('modified'):
168+
assert self._triple(g, distribution, DCT.modified, resource_dict["modified"], XSD.dateTime)
164169

165170
def test_graph_from_dataset_uri(self):
166171
"""Tests that datasets (resources) with a uri from the test system

0 commit comments

Comments
 (0)