Skip to content

Commit 1a5fe2f

Browse files
committed
app context extension
1 parent 1b4737d commit 1a5fe2f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

stac_fastapi/elasticsearch/tests/api/test_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import time
12
from datetime import datetime, timedelta
23

34
import pytest
@@ -94,7 +95,7 @@ def test_app_search_response(load_test_data, app_client, es_transactions):
9495
)
9596

9697

97-
@pytest.mark.skip(reason="this all passes manually?? assert 0 == 1")
98+
# @pytest.mark.skip(reason="this all passes manually?? assert 0 == 1")
9899
def test_app_context_extension(load_test_data, app_client, es_transactions, es_core):
99100
item = load_test_data("test_item.json")
100101
collection = load_test_data("test_collection.json")
@@ -104,6 +105,8 @@ def test_app_context_extension(load_test_data, app_client, es_transactions, es_c
104105
es_transactions.create_collection(collection, request=MockStarletteRequest)
105106
es_transactions.create_item(item, request=MockStarletteRequest)
106107

108+
time.sleep(1)
109+
107110
resp = app_client.get(f"/collections/{collection['id']}/items/{item['id']}")
108111
assert resp.status_code == 200
109112
resp_json = resp.json()
@@ -115,7 +118,7 @@ def test_app_context_extension(load_test_data, app_client, es_transactions, es_c
115118
resp_json = resp.json()
116119
assert resp_json["id"] == collection["id"]
117120

118-
resp = app_client.post("/search", json={"collections": ["test-collection"]})
121+
resp = app_client.post("/search", json={"collections": ["test-collection-2"]})
119122
assert resp.status_code == 200
120123
resp_json = resp.json()
121124
assert len(resp_json["features"]) == 1

0 commit comments

Comments
 (0)