test_post_validation_error() — fastapi Function Reference
Architecture documentation for the test_post_validation_error() function in test_tutorial005.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 29d9db5e_2459_bcee_5d52_18f929ce361d["test_post_validation_error()"] f07417e4_6eba_2057_b927_e0c6c24c19f5["test_tutorial005.py"] 29d9db5e_2459_bcee_5d52_18f929ce361d -->|defined in| f07417e4_6eba_2057_b927_e0c6c24c19f5 style 29d9db5e_2459_bcee_5d52_18f929ce361d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_handling_errors/test_tutorial005.py lines 9–22
def test_post_validation_error():
response = client.post("/items/", json={"title": "towel", "size": "XL"})
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"type": "int_parsing",
"loc": ["body", "size"],
"msg": "Input should be a valid integer, unable to parse string as an integer",
"input": "XL",
}
],
"body": {"title": "towel", "size": "XL"},
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_post_validation_error() do?
test_post_validation_error() is a function in the fastapi codebase, defined in tests/test_tutorial/test_handling_errors/test_tutorial005.py.
Where is test_post_validation_error() defined?
test_post_validation_error() is defined in tests/test_tutorial/test_handling_errors/test_tutorial005.py at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free