Skip to content

Commit 7efa98f

Browse files
committed
Update broken test.
1 parent 0a9d855 commit 7efa98f

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

stac_fastapi/core/stac_fastapi/core/extensions/filter.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,6 @@ class SpatialOp(str, Enum):
9191
S_DISJOINT = "s_disjoint"
9292

9393

94-
# queryables_mapping = {
95-
# "id": "id",
96-
# "collection": "collection",
97-
# "geometry": "geometry",
98-
# "datetime": "properties.datetime",
99-
# "created": "properties.created",
100-
# "updated": "properties.updated",
101-
# "cloud_cover": "properties.eo:cloud_cover",
102-
# "cloud_shadow_percentage": "properties.s2:cloud_shadow_percentage",
103-
# "nodata_pixel_percentage": "properties.s2:nodata_pixel_percentage",
104-
# }
105-
106-
10794
def to_es_field(queryables_mapping: Dict[str, Any], field: str) -> str:
10895
"""
10996
Map a given field to its corresponding Elasticsearch field according to a predefined mapping.

stac_fastapi/tests/extensions/test_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async def test_search_filter_ext_and_get_cql2text_id(app_client, ctx):
163163
async def test_search_filter_ext_and_get_cql2text_cloud_cover(app_client, ctx):
164164
collection = ctx.item["collection"]
165165
cloud_cover = ctx.item["properties"]["eo:cloud_cover"]
166-
filter = f"cloud_cover={cloud_cover} AND collection='{collection}'"
166+
filter = f"eo:cloud_cover={cloud_cover} AND collection='{collection}'"
167167
resp = await app_client.get(f"/search?filter-lang=cql2-text&filter={filter}")
168168

169169
assert resp.status_code == 200
@@ -176,7 +176,7 @@ async def test_search_filter_ext_and_get_cql2text_cloud_cover_no_results(
176176
):
177177
collection = ctx.item["collection"]
178178
cloud_cover = ctx.item["properties"]["eo:cloud_cover"] + 1
179-
filter = f"cloud_cover={cloud_cover} AND collection='{collection}'"
179+
filter = f"eo:cloud_cover={cloud_cover} AND collection='{collection}'"
180180
resp = await app_client.get(f"/search?filter-lang=cql2-text&filter={filter}")
181181

182182
assert resp.status_code == 200

0 commit comments

Comments
 (0)