test_put_incorrect_body_multiple() — fastapi Function Reference
Architecture documentation for the test_put_incorrect_body_multiple() function in test_multi_body_errors.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD d3170df5_27af_f72b_8d62_1e2bd267fbd4["test_put_incorrect_body_multiple()"] 789994cf_4c09_9ccd_b82e_26362f9d8f29["test_multi_body_errors.py"] d3170df5_27af_f72b_8d62_1e2bd267fbd4 -->|defined in| 789994cf_4c09_9ccd_b82e_26362f9d8f29 style d3170df5_27af_f72b_8d62_1e2bd267fbd4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_multi_body_errors.py lines 56–86
def test_put_incorrect_body_multiple():
response = client.post("/items/", json=[{"age": "five"}, {"age": "six"}])
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["body", 0, "name"],
"msg": "Field required",
"input": {"age": "five"},
},
{
"type": "decimal_parsing",
"loc": ["body", 0, "age"],
"msg": "Input should be a valid decimal",
"input": "five",
},
{
"type": "missing",
"loc": ["body", 1, "name"],
"msg": "Field required",
"input": {"age": "six"},
},
{
"type": "decimal_parsing",
"loc": ["body", 1, "age"],
"msg": "Input should be a valid decimal",
"input": "six",
},
]
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_put_incorrect_body_multiple() do?
test_put_incorrect_body_multiple() is a function in the fastapi codebase, defined in tests/test_multi_body_errors.py.
Where is test_put_incorrect_body_multiple() defined?
test_put_incorrect_body_multiple() is defined in tests/test_multi_body_errors.py at line 56.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free