test_put_empty_body() — fastapi Function Reference
Architecture documentation for the test_put_empty_body() function in test_tutorial006.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD df633c3e_0e18_068f_aef2_38e522f69056["test_put_empty_body()"] b94050ac_a58d_457a_8756_02076d630f1f["test_tutorial006.py"] df633c3e_0e18_068f_aef2_38e522f69056 -->|defined in| b94050ac_a58d_457a_8756_02076d630f1f style df633c3e_0e18_068f_aef2_38e522f69056 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_body_nested_models/test_tutorial006.py lines 74–95
def test_put_empty_body(client: TestClient):
response = client.put(
"/items/5",
json={},
)
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"loc": ["body", "name"],
"input": {},
"msg": "Field required",
"type": "missing",
},
{
"loc": ["body", "price"],
"input": {},
"msg": "Field required",
"type": "missing",
},
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_put_empty_body() do?
test_put_empty_body() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body_nested_models/test_tutorial006.py.
Where is test_put_empty_body() defined?
test_put_empty_body() is defined in tests/test_tutorial/test_body_nested_models/test_tutorial006.py at line 74.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free