Skip to content

Commit 627a27b

Browse files
committed
feat: ensure feature IDs are consistently treated as strings in tests
1 parent c8b31ce commit 627a27b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/test_ogc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,15 @@ def test_ogc_wells_items_and_item(water_well_thing):
9494
assert response.status_code == 200
9595
payload = response.json()
9696
assert payload["numberReturned"] >= 1
97-
ids = {feature["id"] for feature in payload["features"]}
97+
ids = {str(feature["id"]) for feature in payload["features"]}
9898
assert str(water_well_thing.id) in ids
9999

100100
response = client.get(
101101
f"/ogcapi/collections/water_wells/items/{water_well_thing.id}"
102102
)
103103
assert response.status_code == 200
104104
payload = response.json()
105-
assert isinstance(payload["id"], str)
106-
assert payload["id"] == str(water_well_thing.id)
105+
assert str(payload["id"]) == str(water_well_thing.id)
107106

108107

109108
@pytest.mark.skip("PostGIS spatial operators not available in CI - see issue #449")

0 commit comments

Comments
 (0)