Skip to content

Commit 45cd558

Browse files
replace load_data
1 parent f8e2256 commit 45cd558

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

stac_fastapi/tests/extensions/test_filter.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,14 @@ async def test_filter_extension_landing_page_link(app_client, ctx):
2020

2121

2222
@pytest.mark.asyncio
23-
async def test_filter_extension_collection_link(app_client, load_test_data):
23+
async def test_filter_extension_collection_link(app_client, ctx):
2424
"""Test creation and deletion of a collection"""
25-
test_collection = load_test_data("test_collection.json")
26-
test_collection["id"] = "test"
2725

28-
resp = await app_client.post("/collections", json=test_collection)
29-
assert resp.status_code == 201
30-
31-
resp = await app_client.get(f"/collections/{test_collection['id']}")
26+
resp = await app_client.get(f"/collections/{ctx.collection['id']}")
3227
resp_json = resp.json()
3328
keys = [link["rel"] for link in resp_json["links"]]
3429
assert "queryables" in keys
3530

36-
resp = await app_client.delete(f"/collections/{test_collection['id']}")
37-
assert resp.status_code == 204
38-
3931

4032
@pytest.mark.asyncio
4133
async def test_search_filters_post(app_client, ctx):

0 commit comments

Comments
 (0)