Skip to content

Commit

Permalink
Update warning catching tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsignell committed Feb 1, 2024
1 parent 3d8315d commit 41a0446
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ def test_get_collections_without_conformance_fallsback_to_pystac(
# Mock the collection
requests_mock.get(pc_collection_href, status_code=200, json=pc_collection_dict)

with pytest.warns(DoesNotConformTo, match="COLLECTIONS, FEATURES"):
_ = next(api.get_collections())
with pytest.warns(FallbackToPystac):
with pytest.warns(DoesNotConformTo, match="COLLECTIONS, FEATURES"):
_ = next(api.get_collections())

history = requests_mock.request_history
assert len(history) == 2
Expand Down

0 comments on commit 41a0446

Please sign in to comment.