From 0afca3c30daa3e69ac078874afe4501ea9eedaa9 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Tue, 7 Nov 2023 11:57:43 +0100 Subject: [PATCH] style: Fix line spacing and whitespace --- .../tests/test_dcatap_ch_serialize.py | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py b/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py index d6b0795..cb3f319 100644 --- a/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py +++ b/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py @@ -20,6 +20,7 @@ assert_true = nose.tools.assert_true log = logging.getLogger(__name__) + class TestDCATAPCHProfileSerializeDataset(BaseSerializeTest): def test_graph_from_dataset(self): @@ -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