Skip to content

Commit

Permalink
added regex to error test
Browse files Browse the repository at this point in the history
issue #499
  • Loading branch information
VictorVerhaert committed Jan 30, 2024
1 parent fc33532 commit 59dd84d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/rest/datacube/test_datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,8 @@ def test_execute_json_decode(connection, requests_mock):
def test_execute_decode_error(connection, requests_mock):
requests_mock.get(API_URL + "/collections/S2", json={})
requests_mock.post(API_URL + "/result", content=b"tiffdata")
with pytest.raises(OpenEoClientException):
with pytest.raises(OpenEoClientException, match="Failed to decode response as JSON.*$"):
connection.load_collection("S2").execute(auto_decode=True)
# TODO check if the message is correct (bevat deze woorden)


def test_execute_json_raw(connection, requests_mock):
Expand Down

0 comments on commit 59dd84d

Please sign in to comment.