Skip to content

Commit 3b3b087

Browse files
committed
add filter extension to os
1 parent e10baad commit 3b3b087

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

stac_fastapi/opensearch/stac_fastapi/opensearch/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
QueryExtension(
133133
conformance_classes=[QueryConformanceClasses.ITEMS],
134134
),
135+
filter_extension,
135136
],
136137
request_type="GET",
137138
)

stac_fastapi/tests/api/test_api.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,26 +1665,6 @@ async def test_filter_by_id(app_client, ctx):
16651665
assert resp_json["features"][0]["id"] == item_id
16661666
assert resp_json["features"][0]["collection"] == collection_id
16671667

1668-
# Create a non-existent ID
1669-
non_existent_id = f"non-existent-{str(uuid.uuid4())}"
1670-
1671-
filter_body = {"op": "=", "args": [{"property": "id"}, non_existent_id]}
1672-
1673-
# Make the request with the filter
1674-
params = [("filter", json.dumps(filter_body)), ("filter-lang", "cql2-json")]
1675-
1676-
resp = await app_client.get(
1677-
f"/collections/{collection_id}/items",
1678-
params=params,
1679-
)
1680-
1681-
# Verify the response
1682-
assert resp.status_code == 200
1683-
resp_json = resp.json()
1684-
1685-
# Should find exactly one matching item
1686-
assert len(resp_json["features"]) == 0
1687-
16881668

16891669
@pytest.mark.asyncio
16901670
async def test_filter_by_nonexistent_id(app_client, ctx, txn_client):

0 commit comments

Comments
 (0)