Skip to content

Commit 7900427

Browse files
committed
add ctx
1 parent 0085835 commit 7900427

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stac_fastapi/elasticsearch/tests/resources/test_item.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ async def test_pagination(app_client, load_test_data):
260260
assert second_page["context"]["returned"] == 3
261261

262262

263-
async def test_item_timestamps(app_client, ctx, load_test_data):
263+
async def test_item_timestamps(app_client, ctx):
264264
"""Test created and updated timestamps (common metadata)"""
265265
# start_time = now_to_rfc3339_str()
266266

@@ -335,7 +335,7 @@ async def test_item_search_temporal_query_post(app_client, ctx):
335335
assert resp_json["features"][0]["id"] == test_item["id"]
336336

337337

338-
async def test_item_search_temporal_window_post(app_client, load_test_data, ctx):
338+
async def test_item_search_temporal_window_post(app_client, ctx):
339339
"""Test POST search with two-tailed spatio-temporal query (core)"""
340340
test_item = ctx.item
341341

@@ -649,15 +649,15 @@ async def test_pagination_token_idempotent(app_client, ctx, txn_client):
649649
]
650650

651651

652-
async def test_field_extension_get_includes(app_client):
652+
async def test_field_extension_get_includes(app_client, ctx):
653653
"""Test GET search with included fields (fields extension)"""
654654
params = {"fields": "+properties.proj:epsg,+properties.gsd"}
655655
resp = await app_client.get("/search", params=params)
656656
feat_properties = resp.json()["features"][0]["properties"]
657657
assert not set(feat_properties) - {"proj:epsg", "gsd", "datetime"}
658658

659659

660-
async def test_field_extension_get_excludes(app_client):
660+
async def test_field_extension_get_excludes(app_client, ctx):
661661
"""Test GET search with included fields (fields extension)"""
662662
params = {"fields": "-properties.proj:epsg,-properties.gsd"}
663663
resp = await app_client.get("/search", params=params)
@@ -666,7 +666,7 @@ async def test_field_extension_get_excludes(app_client):
666666
assert "gsd" not in resp_json["features"][0]["properties"].keys()
667667

668668

669-
async def test_field_extension_post(app_client):
669+
async def test_field_extension_post(app_client, ctx):
670670
"""Test POST search with included and excluded fields (fields extension)"""
671671
body = {
672672
"fields": {
@@ -685,7 +685,7 @@ async def test_field_extension_post(app_client):
685685
}
686686

687687

688-
async def test_field_extension_exclude_and_include(app_client, load_test_data):
688+
async def test_field_extension_exclude_and_include(app_client, ctx):
689689
"""Test POST search including/excluding same field (fields extension)"""
690690
body = {
691691
"fields": {
@@ -699,7 +699,7 @@ async def test_field_extension_exclude_and_include(app_client, load_test_data):
699699
assert "eo:cloud_cover" not in resp_json["features"][0]["properties"]
700700

701701

702-
async def test_field_extension_exclude_default_includes(app_client, load_test_data):
702+
async def test_field_extension_exclude_default_includes(app_client, ctx):
703703
"""Test POST search excluding a forbidden field (fields extension)"""
704704
body = {"fields": {"exclude": ["gsd"]}}
705705

0 commit comments

Comments
 (0)