lint and format

This commit is contained in:
grillazz
2025-08-24 15:40:06 +02:00
parent 9c7db17da8
commit 978041c6ee
7 changed files with 37 additions and 106 deletions

View File

@@ -27,13 +27,17 @@ async def test_add_stuff(client: AsyncClient):
)
response = await client.post("/stuff", json=stuff)
assert response.status_code == status.HTTP_500_INTERNAL_SERVER_ERROR
assert response.json() == snapshot({'message':'A database error occurred. Please try again later.'})
assert response.json() == snapshot(
{"message": "A database error occurred. Please try again later."}
)
async def test_get_stuff(client: AsyncClient):
response = await client.get(f"/stuff/nonexistent")
response = await client.get("/stuff/nonexistent")
assert response.status_code == status.HTTP_404_NOT_FOUND
assert response.json() == snapshot({'no_response':'The requested resource was not found'})
assert response.json() == snapshot(
{"no_response": "The requested resource was not found"}
)
stuff = StuffFactory.build(factory_use_constructors=True).model_dump(mode="json")
await client.post("/stuff", json=stuff)
name = stuff["name"]