Skip to content

Commit

Permalink
#150: Fix test failures due to refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Nov 30, 2020
1 parent 7aae8c8 commit 9ed2694
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/icat/endpoints/test_count_with_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class TestCountWithFilters:
@pytest.mark.usefixtures("single_investigation_test_data")
def test_valid_count_with_filters(self, flask_test_app, valid_credentials_header):
test_response = flask_test_app.get(
'/investigations/count?where={"title": {"eq": "Test data for the Python'
'/investigations/count?where={"title": {"like": "Test data for the Python'
' ICAT Backend on DataGateway API"}}',
headers=valid_credentials_header,
)
Expand All @@ -16,7 +16,7 @@ def test_valid_no_results_count_with_filters(
self, flask_test_app, valid_credentials_header,
):
test_response = flask_test_app.get(
'/investigations/count?where={"title": {"eq": "This filter should cause a'
'/investigations/count?where={"title": {"like": "This filter should cause a'
'404 for testing purposes..."}}',
headers=valid_credentials_header,
)
Expand Down
2 changes: 1 addition & 1 deletion test/icat/endpoints/test_findone.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def test_valid_findone_with_filters(
self, flask_test_app, valid_credentials_header, single_investigation_test_data,
):
test_response = flask_test_app.get(
'/investigations/findone?where={"title": {"eq": "Test data for the Python'
'/investigations/findone?where={"title": {"like": "Test data for the Python'
' ICAT Backend on DataGateway API"}}',
headers=valid_credentials_header,
)
Expand Down
2 changes: 1 addition & 1 deletion test/icat/endpoints/test_get_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def test_valid_get_with_id(
):
# Need to identify the ID given to the test data
investigation_data = flask_test_app.get(
'/investigations?where={"title": {"eq": "Test data for the Python ICAT'
'/investigations?where={"title": {"like": "Test data for the Python ICAT'
' Backend on DataGateway API"}}',
headers=valid_credentials_header,
)
Expand Down
2 changes: 1 addition & 1 deletion test/icat/endpoints/test_get_with_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_valid_get_with_filters(
self, flask_test_app, valid_credentials_header, single_investigation_test_data,
):
test_response = flask_test_app.get(
'/investigations?where={"title": {"eq": "Test data for the Python ICAT'
'/investigations?where={"title": {"like": "Test data for the Python ICAT'
' Backend on DataGateway API"}}',
headers=valid_credentials_header,
)
Expand Down
4 changes: 2 additions & 2 deletions test/icat/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_valid_query_exeuction(
):
test_query = ICATQuery(icat_client, "Investigation")
test_data_filter = PythonICATWhereFilter(
"title", "Test data for the Python ICAT Backend on DataGateway API", "eq",
"title", "Test data for the Python ICAT Backend on DataGateway API", "like",
)
test_data_filter.apply_filter(test_query.query)
query_data = test_query.execute_query(icat_client)
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_json_format_execution_output(
):
test_query = ICATQuery(icat_client, "Investigation")
test_data_filter = PythonICATWhereFilter(
"title", "Test data for the Python ICAT Backend on DataGateway API", "eq",
"title", "Test data for the Python ICAT Backend on DataGateway API", "like",
)
test_data_filter.apply_filter(test_query.query)
query_data = test_query.execute_query(icat_client, True)
Expand Down
2 changes: 1 addition & 1 deletion test/icat/test_session_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_valid_login(self, flask_test_app, icat_client, icat_query):
icat_client.sessionId = login_response.json["sessionID"]
icat_query.setAggregate("COUNT")
title_filter = PythonICATWhereFilter(
"title", "Test data for the Python ICAT Backend on DataGateway API", "eq",
"title", "Test data for the Python ICAT Backend on DataGateway API", "like",
)
title_filter.apply_filter(icat_query)

Expand Down

0 comments on commit 9ed2694

Please sign in to comment.