mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-17 12:55:28 -04:00
👷 Add pre-commit to check typos (#15482)
This commit is contained in:
committed by
GitHub
parent
3efd86c1fd
commit
fb7429378d
@@ -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",
|
||||
|
||||
@@ -82,7 +82,7 @@ def test_post_no_body(client: TestClient):
|
||||
}
|
||||
|
||||
|
||||
def test_post_like_not_embeded(client: TestClient):
|
||||
def test_post_like_not_embedded(client: TestClient):
|
||||
response = client.put(
|
||||
"/items/5",
|
||||
json={
|
||||
|
||||
Reference in New Issue
Block a user