Home / Function/ test_login_incorrect_username() — fastapi Function Reference

test_login_incorrect_username() — fastapi Function Reference

Architecture documentation for the test_login_incorrect_username() function in test_tutorial004.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  26804495_3775_6793_611e_9724dea04969["test_login_incorrect_username()"]
  99a6e52c_39c3_5825_2899_8b0fa980bff4["test_tutorial004.py"]
  26804495_3775_6793_611e_9724dea04969 -->|defined in| 99a6e52c_39c3_5825_2899_8b0fa980bff4
  style 26804495_3775_6793_611e_9724dea04969 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_security/test_tutorial004.py lines 53–57

def test_login_incorrect_username(mod: ModuleType):
    client = TestClient(mod.app)
    response = client.post("/token", data={"username": "foo", "password": "secret"})
    assert response.status_code == 401, response.text
    assert response.json() == {"detail": "Incorrect username or password"}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free