Skip to content

Commit

Permalink
replace load_data
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfisher-geo committed Nov 24, 2024
1 parent f8e2256 commit 45cd558
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions stac_fastapi/tests/extensions/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ async def test_filter_extension_landing_page_link(app_client, ctx):


@pytest.mark.asyncio
async def test_filter_extension_collection_link(app_client, load_test_data):
async def test_filter_extension_collection_link(app_client, ctx):
"""Test creation and deletion of a collection"""
test_collection = load_test_data("test_collection.json")
test_collection["id"] = "test"

resp = await app_client.post("/collections", json=test_collection)
assert resp.status_code == 201

resp = await app_client.get(f"/collections/{test_collection['id']}")
resp = await app_client.get(f"/collections/{ctx.collection['id']}")
resp_json = resp.json()
keys = [link["rel"] for link in resp_json["links"]]
assert "queryables" in keys

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


@pytest.mark.asyncio
async def test_search_filters_post(app_client, ctx):
Expand Down

0 comments on commit 45cd558

Please sign in to comment.