Skip to content

Commit e5251ba

Browse files
committed
Fix unformatted f-strings
1 parent aa4bcbd commit e5251ba

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

stac_fastapi/pgstac/tests/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,10 @@ async def load_test_collection(app_client, load_test_data):
176176

177177
@pytest.fixture
178178
async def load_test_item(app_client, load_test_data, load_test_collection):
179+
coll = load_test_collection
179180
data = load_test_data("test_item.json")
180181
resp = await app_client.post(
181-
"/collections/{coll.id}/items",
182+
f"/collections/{coll.id}/items",
182183
json=data,
183184
)
184185
assert resp.status_code == 200
@@ -198,9 +199,10 @@ async def load_test2_collection(app_client, load_test_data):
198199

199200
@pytest.fixture
200201
async def load_test2_item(app_client, load_test_data, load_test2_collection):
202+
coll = load_test2_collection
201203
data = load_test_data("test2_item.json")
202204
resp = await app_client.post(
203-
"/collections/{coll.id}/items",
205+
f"/collections/{coll.id}/items",
204206
json=data,
205207
)
206208
assert resp.status_code == 200

stac_fastapi/pgstac/tests/resources/test_item.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def test_fetches_valid_item(
107107
in_json = load_test_data("test_item.json")
108108
in_item = Item.parse_obj(in_json)
109109
resp = await app_client.post(
110-
"/collections/{coll.id}/items",
110+
f"/collections/{coll.id}/items",
111111
json=in_json,
112112
)
113113
assert resp.status_code == 200
@@ -200,18 +200,17 @@ async def test_get_collection_items(app_client, load_test_collection, load_test_
200200
async def test_create_item_conflict(
201201
app_client, load_test_data: Callable, load_test_collection
202202
):
203-
pass
204-
203+
coll = load_test_collection
205204
in_json = load_test_data("test_item.json")
206205
Item.parse_obj(in_json)
207206
resp = await app_client.post(
208-
"/collections/{coll.id}/items",
207+
f"/collections/{coll.id}/items",
209208
json=in_json,
210209
)
211210
assert resp.status_code == 200
212211

213212
resp = await app_client.post(
214-
"/collections/{coll.id}/items",
213+
f"/collections/{coll.id}/items",
215214
json=in_json,
216215
)
217216
assert resp.status_code == 409

0 commit comments

Comments
 (0)