|
|
|
@ -154,13 +154,16 @@ def test_post_missing_required_field_in_item(client: TestClient): |
|
|
|
def test_post_missing_required_field_in_user(client: TestClient): |
|
|
|
response = client.put( |
|
|
|
"/items/5", |
|
|
|
json={"item": {"name": "Foo", "price": 50.5}, "user": {"ful_name": "John Doe"}}, |
|
|
|
json={ |
|
|
|
"item": {"name": "Foo", "price": 50.5}, |
|
|
|
"user": {"full_name": "John Doe"}, |
|
|
|
}, |
|
|
|
) |
|
|
|
assert response.status_code == 422 |
|
|
|
assert response.json() == { |
|
|
|
"detail": [ |
|
|
|
{ |
|
|
|
"input": {"ful_name": "John Doe"}, |
|
|
|
"input": {"full_name": "John Doe"}, |
|
|
|
"loc": [ |
|
|
|
"body", |
|
|
|
"user", |
|
|
|
|