Skip to content

Commit a118bba

Browse files
committed
add test
1 parent 141f9e3 commit a118bba

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

stac_fastapi/elasticsearch/tests/api/test_api.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,21 @@ async def test_search_point_intersects(app_client, ctx):
201201
assert len(resp_json["features"]) == 1
202202

203203

204+
async def test_search_point_does_not_intersect(app_client, ctx):
205+
point = [15.04, -3.14]
206+
intersects = {"type": "Point", "coordinates": point}
207+
208+
params = {
209+
"intersects": intersects,
210+
"collections": [ctx.item["collection"]],
211+
}
212+
resp = await app_client.post("/search", json=params)
213+
214+
assert resp.status_code == 200
215+
resp_json = resp.json()
216+
assert len(resp_json["features"]) == 0
217+
218+
204219
async def test_datetime_non_interval(app_client, ctx):
205220
dt_formats = [
206221
"2020-02-12T12:30:22+00:00",

0 commit comments

Comments
 (0)