test_required_alias_and_validation_alias_by_name() — fastapi Function Reference
Architecture documentation for the test_required_alias_and_validation_alias_by_name() function in test_required_str.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD ea054c81_9677_ed80_c756_a3626e1a9a77["test_required_alias_and_validation_alias_by_name()"] 45768896_4720_0ffe_18a6_a9be9369e316["test_required_str.py"] ea054c81_9677_ed80_c756_a3626e1a9a77 -->|defined in| 45768896_4720_0ffe_18a6_a9be9369e316 style ea054c81_9677_ed80_c756_a3626e1a9a77 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_request_params/test_form/test_required_str.py lines 359–376
def test_required_alias_and_validation_alias_by_name(path: str):
client = TestClient(app)
response = client.post(path, data={"p": "hello"})
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": [
"body",
"p_val_alias",
],
"msg": "Field required",
"input": IsOneOf(None, {"p": "hello"}),
}
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_required_alias_and_validation_alias_by_name() do?
test_required_alias_and_validation_alias_by_name() is a function in the fastapi codebase, defined in tests/test_request_params/test_form/test_required_str.py.
Where is test_required_alias_and_validation_alias_by_name() defined?
test_required_alias_and_validation_alias_by_name() is defined in tests/test_request_params/test_form/test_required_str.py at line 359.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free