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