Skip to content

Commit

Permalink
#119: Fix tests for change to no results behaviour
Browse files Browse the repository at this point in the history
- A couple of commits ago, the ICAT backend was changed so that 404s no longer occur when no results are found. This is because no results being found is correct behaviour, so should give a 200
  • Loading branch information
MRichards99 committed Feb 22, 2021
1 parent 1ee7961 commit 268dac3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/icat/endpoints/test_get_with_filters_icat.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_valid_no_results_get_with_filters(
headers=valid_icat_credentials_header,
)

assert test_response.status_code == 404
assert test_response.json == []

@pytest.mark.usefixtures("multiple_investigation_test_data")
def test_valid_get_with_filters_distinct(
Expand Down
4 changes: 2 additions & 2 deletions test/icat/endpoints/test_table_endpoints_icat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_invalid_get_facility_cycles_with_filters(
headers=valid_icat_credentials_header,
)

assert test_response.status_code == 404
assert test_response.json == []

def test_valid_get_facility_cycles_count_with_filters(
self,
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_invalid_get_investigations_with_filters(
headers=valid_icat_credentials_header,
)

assert test_response.status_code == 404
assert test_response.json == []

def test_valid_get_investigations_count_with_filters(
self,
Expand Down

0 comments on commit 268dac3

Please sign in to comment.