test_post_body_json() — fastapi Function Reference
Architecture documentation for the test_post_body_json() function in test_tutorial002.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 41f99225_e9fb_dacf_602d_f8f4da4a034e["test_post_body_json()"] 867971c8_4eb0_eae6_874c_699c5e8b76d7["test_tutorial002.py"] 41f99225_e9fb_dacf_602d_f8f4da4a034e -->|defined in| 867971c8_4eb0_eae6_874c_699c5e8b76d7 style 41f99225_e9fb_dacf_602d_f8f4da4a034e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_request_files/test_tutorial002.py lines 43–55
def test_post_body_json(client: TestClient):
response = client.post("/files/", json={"file": "Foo"})
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["body", "files"],
"msg": "Field required",
"input": None,
}
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_post_body_json() do?
test_post_body_json() is a function in the fastapi codebase, defined in tests/test_tutorial/test_request_files/test_tutorial002.py.
Where is test_post_body_json() defined?
test_post_body_json() is defined in tests/test_tutorial/test_request_files/test_tutorial002.py at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free