Skip to content

Commit 42b032e

Browse files
committed
Rectify test
1 parent 27b3552 commit 42b032e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/test_filters_jinja2.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,10 @@ def test_item_get(
307307
"properties": {"private": True},
308308
}
309309
response = client.get("/collections/foo/items/bar")
310-
expected_status = 200 if is_authenticated else 404
311-
expected_body = (
312-
{"id": "bar", "properties": {"private": True}}
313-
if is_authenticated
314-
else {"message": "Not found"}
315-
)
316-
assert response.status_code == expected_status
317-
assert response.json() == expected_body
310+
if is_authenticated:
311+
assert response.status_code == 200
312+
assert response.json()["id"] == "bar"
313+
assert response.json()["properties"] == {"private": True}
314+
else:
315+
assert response.status_code == 404
316+
assert response.json() == {"message": "Not found"}

0 commit comments

Comments
 (0)