✅ Improve test debugging (#1222)

This commit is contained in:
Samuel Colvin authored and GitHub committed 2020-04-08 06:37:38 +02:00
1 parent 483bce3ae1
commit e9b189e9f2
144 files changed
+434 -434

No files matched your search

@@ -113,7 +113,7 @@ openapi_schema = {
def test_openapi_schema():
with TestClient(app) as client:
response = client.get("/openapi.json")
assert response.status_code == 200
assert response.status_code == 200, response.text
assert response.json() == openapi_schema
@@ -121,11 +121,11 @@ def test_create_read():
with TestClient(app) as client:
note = {"text": "Foo bar", "completed": False}
response = client.post("/notes/", json=note)
assert response.status_code == 200
assert response.status_code == 200, response.text
data = response.json()
assert data["text"] == note["text"]
assert data["completed"] == note["completed"]
assert "id" in data
response = client.get(f"/notes/")
assert response.status_code == 200
assert response.status_code == 200, response.text
assert data in response.json()