test_post_body_form_no_username() — fastapi Function Reference
Architecture documentation for the test_post_body_form_no_username() function in test_tutorial001.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 7be395c4_a018_f00c_35a6_d14a2e12ebcd["test_post_body_form_no_username()"] 92fad492_fe00_2786_c693_5e619947713b["test_tutorial001.py"] 7be395c4_a018_f00c_35a6_d14a2e12ebcd -->|defined in| 92fad492_fe00_2786_c693_5e619947713b style 7be395c4_a018_f00c_35a6_d14a2e12ebcd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_request_form_models/test_tutorial001.py lines 43–55
def test_post_body_form_no_username(client: TestClient):
response = client.post("/login/", data={"password": "secret"})
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["body", "username"],
"msg": "Field required",
"input": {"password": "secret"},
}
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_post_body_form_no_username() do?
test_post_body_form_no_username() is a function in the fastapi codebase, defined in tests/test_tutorial/test_request_form_models/test_tutorial001.py.
Where is test_post_body_form_no_username() defined?
test_post_body_form_no_username() is defined in tests/test_tutorial/test_request_form_models/test_tutorial001.py at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free