Browse Source

Update tests

pull/14978/head
Sebastián Ramírez 5 months ago
parent
commit
71967fd167
  1. 10
      tests/test_tutorial/test_body/test_tutorial001.py

10
tests/test_tutorial/test_body/test_tutorial001.py

@ -189,18 +189,12 @@ def test_geo_json(client: TestClient):
assert response.status_code == 200, response.text assert response.status_code == 200, response.text
def test_no_content_type_is_json(client: TestClient): def test_no_content_type_json(client: TestClient):
response = client.post( response = client.post(
"/items/", "/items/",
content='{"name": "Foo", "price": 50.5}', content='{"name": "Foo", "price": 50.5}',
) )
assert response.status_code == 200, response.text assert response.status_code == 422, response.text
assert response.json() == {
"name": "Foo",
"description": None,
"price": 50.5,
"tax": None,
}
def test_wrong_headers(client: TestClient): def test_wrong_headers(client: TestClient):

Loading…
Cancel
Save