mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-27 04:09:37 -04:00
✅ Improve test debugging (#1222)
This commit is contained in:
1 parent
483bce3ae1
commit
e9b189e9f2
144 files changed
+434
-434
No files matched your search
@@ -85,7 +85,7 @@ openapi_schema = {
|
||||
|
||||
def test_openapi_schema():
|
||||
response = client.get("/openapi.json")
|
||||
assert response.status_code == 200
|
||||
assert response.status_code == 200, response.text
|
||||
assert response.json() == openapi_schema
|
||||
|
||||
|
||||
@@ -145,5 +145,5 @@ def test_post_body_form(path, body, expected_status, expected_response):
|
||||
|
||||
def test_post_body_json():
|
||||
response = client.post("/login/", json={"username": "Foo", "password": "secret"})
|
||||
assert response.status_code == 422
|
||||
assert response.status_code == 422, response.text
|
||||
assert response.json() == username_and_password_required
|
||||
Reference in new issue
Block a user