Skip to content

Commit 6b9d986

Browse files
committed
add fields plus query test
1 parent 5ef8806 commit 6b9d986

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stac_fastapi/elasticsearch/tests/api/test_api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ async def test_app_fields_extension(app_client, ctx, txn_client):
115115
assert list(resp_json["features"][0]["properties"]) == ["datetime"]
116116

117117

118+
async def test_app_fields_extension_query(app_client, ctx, txn_client):
119+
resp = await app_client.post("/search", json={"query": {"proj:epsg": {"gte": ctx.item["properties"]["proj:epsg"]}}, "collections": ["test-collection"]})
120+
assert resp.status_code == 200
121+
resp_json = resp.json()
122+
assert list(resp_json["features"][0]["properties"]) == ["datetime", "proj:epsg"]
123+
124+
118125
async def test_app_fields_extension_no_properties_get(app_client, ctx, txn_client):
119126
resp = await app_client.get(
120127
"/search", params={"collections": ["test-collection"], "fields": "-properties"}

0 commit comments

Comments
 (0)