We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27b3552 commit 42b032eCopy full SHA for 42b032e
tests/test_filters_jinja2.py
@@ -307,11 +307,10 @@ def test_item_get(
307
"properties": {"private": True},
308
}
309
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
+ if is_authenticated:
+ assert response.status_code == 200
+ assert response.json()["id"] == "bar"
+ assert response.json()["properties"] == {"private": True}
+ else:
+ assert response.status_code == 404
+ assert response.json() == {"message": "Not found"}
0 commit comments