test_put_empty_body() — fastapi Function Reference
Architecture documentation for the test_put_empty_body() function in test_tutorial004.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD e3e3ff43_3258_6aaf_bbde_18434a537e6b["test_put_empty_body()"] b873bd55_00fd_d2fe_6e07_5c06e67da7d3["test_tutorial004.py"] e3e3ff43_3258_6aaf_bbde_18434a537e6b -->|defined in| b873bd55_00fd_d2fe_6e07_5c06e67da7d3 style e3e3ff43_3258_6aaf_bbde_18434a537e6b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_body_multiple_params/test_tutorial004.py lines 110–134
def test_put_empty_body(client: TestClient):
response = client.put("/items/5", json={})
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["body", "item"],
"msg": "Field required",
"input": None,
},
{
"type": "missing",
"loc": ["body", "user"],
"msg": "Field required",
"input": None,
},
{
"type": "missing",
"loc": ["body", "importance"],
"msg": "Field required",
"input": None,
},
]
}
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_multiple_params/test_tutorial004.py.
Where is test_put_empty_body() defined?
test_put_empty_body() is defined in tests/test_tutorial/test_body_multiple_params/test_tutorial004.py at line 110.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free