Skip to content

Commit

Permalink
test: fix test caused by lack of ICAT 5.0 #260
Browse files Browse the repository at this point in the history
- The mapping file contains ICAT field names which will only be present in the upcoming release of ICAT 5.0, therefore the test gets an error from Python ICAT when trying to use them
  • Loading branch information
MRichards99 committed Dec 21, 2021
1 parent 9937c36 commit cf70161
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/search_api/filters/test_search_api_where_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,11 @@ class TestSearchAPIWhereFilter:
),
pytest.param(
SearchAPIWhereFilter(
"instrument.datasets.parameters.unit", "Dataset parameter", "eq",
"documents.parameters.document.pid", "Test DOI", "eq",
),
"Dataset",
"SELECT o FROM Dataset o JOIN o.investigation AS i JOIN"
" i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN"
" s2.investigationInstruments AS s3 JOIN s3.investigation AS s4 JOIN"
" s4.datasets AS s5 JOIN s5.parameters AS s6 JOIN s6.type AS s7 WHERE"
" s7.units = 'Dataset parameter'",
"SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.parameters AS"
" s1 JOIN s1.investigation AS s2 WHERE s2.doi = 'Test DOI'",
id="WHERE filter on ICAT related entity with three PaNOSC hops",
),
pytest.param(
Expand Down Expand Up @@ -113,8 +110,6 @@ def test_valid_apply_where_filter(self, filter_input, entity_name, expected_quer

filter_handler.apply_filters(test_query)

print(f"JPQL Query: {str(test_query.icat_query.query)}")

assert expected_query == str(test_query.icat_query.query)

@pytest.mark.parametrize(
Expand Down

0 comments on commit cf70161

Please sign in to comment.