Skip to content

Commit 6c9fa4e

Browse files
committed
spelling correction for colectionId to collectionId
1 parent f78d563 commit 6c9fa4e

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

tests/routes/test_item.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_item(app):
2121
assert response.status_code == 200
2222
assert response.headers["content-type"] == "application/json"
2323
feat = response.json()
24-
assert ["colectionId", "itemId", "id", "pr", "row", "path", "ogc_fid"] == list(
24+
assert ["collectionId", "itemId", "id", "pr", "row", "path", "ogc_fid"] == list(
2525
feat.keys()
2626
)
2727

tests/routes/test_items.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,25 @@ def test_output_response_type(app):
543543
body = response.json()
544544
assert len(body) == 10
545545
feat = body[0]
546-
assert ["colectionId", "itemId", "id", "pr", "row", "path", "ogc_fid"] == list(
546+
assert [
547+
"collectionId",
548+
"itemId",
549+
"id",
550+
"pr",
551+
"row",
552+
"path",
553+
"ogc_fid",
554+
"geometry",
555+
] == list(feat.keys())
556+
557+
# json output no geometry
558+
response = app.get("/collections/public.landsat_wrs/items?f=json&geom-column=none")
559+
assert response.status_code == 200
560+
assert response.headers["content-type"] == "application/json"
561+
body = response.json()
562+
assert len(body) == 10
563+
feat = body[0]
564+
assert ["collectionId", "itemId", "id", "pr", "row", "path", "ogc_fid"] == list(
547565
feat.keys()
548566
)
549567

tifeatures/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ async def item(
853853
if output_type == MediaType.json:
854854
return JSONResponse(
855855
{
856-
"colectionId": collection.id,
856+
"collectionId": collection.id,
857857
"itemId": data.id,
858858
**data.properties,
859859
},

0 commit comments

Comments
 (0)