Home / Function/ test_login() — fastapi Function Reference

test_login() — fastapi Function Reference

Architecture documentation for the test_login() function in test_tutorial003.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  e4ad8185_b11f_8f5a_cd51_81563ffb4c1b["test_login()"]
  9ba0315d_cf11_da38_8176_486317d0cd54["test_tutorial003.py"]
  e4ad8185_b11f_8f5a_cd51_81563ffb4c1b -->|defined in| 9ba0315d_cf11_da38_8176_486317d0cd54
  style e4ad8185_b11f_8f5a_cd51_81563ffb4c1b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_security/test_tutorial003.py lines 26–29

def test_login(client: TestClient):
    response = client.post("/token", data={"username": "johndoe", "password": "secret"})
    assert response.status_code == 200, response.text
    assert response.json() == {"access_token": "johndoe", "token_type": "bearer"}

Domain

Subdomains

Frequently Asked Questions

What does test_login() do?
test_login() is a function in the fastapi codebase, defined in tests/test_tutorial/test_security/test_tutorial003.py.
Where is test_login() defined?
test_login() is defined in tests/test_tutorial/test_security/test_tutorial003.py at line 26.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free