test_invalid_data() — fastapi Function Reference
Architecture documentation for the test_invalid_data() function in test_forms_single_model.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 41043322_8c32_80ce_ac1e_8d0bb3eb49b1["test_invalid_data()"] 9040b4f3_c3f5_c14a_b0ec_0bf00390d9d7["test_forms_single_model.py"] 41043322_8c32_80ce_ac1e_8d0bb3eb49b1 -->|defined in| 9040b4f3_c3f5_c14a_b0ec_0bf00390d9d7 style 41043322_8c32_80ce_ac1e_8d0bb3eb49b1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_forms_single_model.py lines 70–90
def test_invalid_data():
response = client.post(
"/form/",
data={
"username": "Rick",
"lastname": "Sanchez",
"age": "seventy",
"tags": ["plumbus", "citadel"],
},
)
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"type": "int_parsing",
"loc": ["body", "age"],
"msg": "Input should be a valid integer, unable to parse string as an integer",
"input": "seventy",
}
]
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_invalid_data() do?
test_invalid_data() is a function in the fastapi codebase, defined in tests/test_forms_single_model.py.
Where is test_invalid_data() defined?
test_invalid_data() is defined in tests/test_forms_single_model.py at line 70.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free