test_post_invalid_body() — fastapi Function Reference
Architecture documentation for the test_post_invalid_body() function in test_tutorial009.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 11c498fe_69af_13ee_04e1_4e264b62edfe["test_post_invalid_body()"] 6e86b754_c34a_5a6b_6214_2fbcb3b7c075["test_tutorial009.py"] 11c498fe_69af_13ee_04e1_4e264b62edfe -->|defined in| 6e86b754_c34a_5a6b_6214_2fbcb3b7c075 style 11c498fe_69af_13ee_04e1_4e264b62edfe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_body_nested_models/test_tutorial009.py lines 28–41
def test_post_invalid_body(client: TestClient):
data = {"foo": 2.2, "3": 3.3}
response = client.post("/index-weights/", json=data)
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"type": "int_parsing",
"loc": ["body", "foo", "[key]"],
"msg": "Input should be a valid integer, unable to parse string as an integer",
"input": "foo",
}
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_post_invalid_body() do?
test_post_invalid_body() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body_nested_models/test_tutorial009.py.
Where is test_post_invalid_body() defined?
test_post_invalid_body() is defined in tests/test_tutorial/test_body_nested_models/test_tutorial009.py at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free