Skip to content

Commit

Permalink
style: Fix line spacing and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bellisk committed Nov 7, 2023
1 parent 5488c69 commit 0afca3c
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
assert_true = nose.tools.assert_true
log = logging.getLogger(__name__)


class TestDCATAPCHProfileSerializeDataset(BaseSerializeTest):

def test_graph_from_dataset(self):
Expand Down Expand Up @@ -78,42 +79,39 @@ def test_graph_from_dataset(self):
distribution = URIRef(dh.resource_uri(resource_dict))
assert self._triple(g, distribution, RDF.type, DCAT.Distribution)
for link in resource_dict.get("documentation", []):
assert self._triple(g, distribution, FOAF.page, URIRef(link))
#e2c50e70-67ad-4f86-bb1b-3f93867eadaa
assert self._triple(g, distribution, FOAF.page, URIRef(link))

# e2c50e70-67ad-4f86-bb1b-3f93867eadaa
if resource_dict.get('rights') == 'Creative Commons CC Zero License (cc-zero)':
assert self._triple(g, distribution, DCT.rights, URIRef("http://dcat-ap.de/def/licenses/cc-zero"))

if resource_dict.get('license') == 'NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired':
assert self._triple(g, distribution, DCT.license, URIRef("http://dcat-ap.ch/vocabulary/licenses/terms_open"))


#28e75e40-e1a1-497b-a1b9-8c1834d60201

# 28e75e40-e1a1-497b-a1b9-8c1834d60201
if resource_dict.get('rights') == "http://dcat-ap.ch/vocabulary/licenses/terms_by":
assert self._triple(g, distribution, DCT.rights, URIRef("http://dcat-ap.ch/vocabulary/licenses/terms_by"))

if resource_dict.get('license') == "NonCommercialAllowed-CommercialAllowed-ReferenceRequired":
assert self._triple(g, distribution, DCT.license, URIRef("http://dcat-ap.ch/vocabulary/licenses/terms_by"))


#0cfce6ba-28f4-4229-b733-f6492c650395

# 0cfce6ba-28f4-4229-b733-f6492c650395
if resource_dict.get('rights') == "http://dcat-ap.ch/vocabulary/licenses/terms_by_ask":
assert self._triple(g, distribution, DCT.rights, URIRef("http://dcat-ap.ch/vocabulary/licenses/terms_by_ask"))

if resource_dict.get('license') == "http://dcat-ap.ch/vocabulary/licenses/cc-by/4.0":
assert self._triple(g, distribution, DCT.license, URIRef("http://dcat-ap.ch/vocabulary/licenses/cc-by/4.0"))


if resource_dict.get('format') == "CSV":
assert self._triple(g, distribution, DCT['format'], URIRef("http://publications.europa.eu/resource/authority/file-type/CSV"))

if resource_dict.get('format') == "HTML":
assert self._triple(g, distribution, DCT['format'], URIRef("http://publications.europa.eu/resource/authority/file-type/HTML"))

if resource_dict.get('format') == "1d-interleaved-parityfec":
assert self._triple(g, distribution, DCT['format'], URIRef("http://www.iana.org/assignments/video/1d-interleaved-parityfec"))


def test_graph_from_dataset_uri(self):
"""Tests that datasets (resources) with a uri from the test system
have that uri changed to reference the prod system when they are output
Expand Down

0 comments on commit 0afca3c

Please sign in to comment.