Skip to content

Commit

Permalink
additional review points
Browse files Browse the repository at this point in the history
  • Loading branch information
mwigham committed Mar 12, 2024
1 parent 44d1688 commit e2bb033
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/tests/unit_tests/apis/dataset/lod_data_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test___get_lod_view_resource(application, application_settings, i_dataset):
assert str(item["@id"]) in html_result


def test___get_lod_view_resource_error(application, application_settings, caplog):
def test___get_lod_view_resource_error(application, application_settings):
DUMMY_URL = "http://data.beeldengeluid.nl/id/dataset/0001"
lod_data_api = LODDataAPI()

Expand Down
4 changes: 1 addition & 3 deletions src/tests/unit_tests/apis/dataset/lod_dataset_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,7 @@ def test_get_404(mime_type, application_settings, generic_client, dataset_url, c
when(apis.dataset.dataset_api.LODDatasetAPI).is_dataset(DUMMY_URI).thenReturn(
False
)
when(apis.dataset.dataset_api.LODDatasetAPI).is_valid_dataset(
DUMMY_URI
).thenReturn(True)
when(apis.dataset.dataset_api.LODDatasetAPI).is_valid_dataset(DUMMY_URI)
when(apis.dataset.dataset_api.LODDatasetAPI)._get_lod_view_resource(
DUMMY_URI,
application_settings.get("SPARQL_ENDPOINT"),
Expand Down
2 changes: 2 additions & 0 deletions src/tests/unit_tests/apis/resource/resource_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ def test_get_500(
unstub()


# Note: it may appear as if the graph arguments are not used. But this is not true, they are loaded dynamically
# according to the program type
@pytest.mark.parametrize("item_type", [None, "scene", "program", "season", "series"])
def test__get_lod_view_resource(
item_type,
Expand Down
1 change: 1 addition & 0 deletions src/util/ld_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def get_skosxl_label_triples_for_skos_concept_from_rdf_store(
:param sparql_endpoint: the location of the RDF store.
"""
query_construct_skos_xl_labels = (
f"PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#> "
f"CONSTRUCT {{ ?s ?skos_label ?y . ?y skosxl:literalForm ?literal_form . "
f"?y a skosxl:Label }} WHERE {{ "
f"VALUES ?s {{ <{resource_url}> }} "
Expand Down

0 comments on commit e2bb033

Please sign in to comment.