Home / Function/ test_strict_login_no_grant_type() — fastapi Function Reference

test_strict_login_no_grant_type() — fastapi Function Reference

Architecture documentation for the test_strict_login_no_grant_type() function in test_security_oauth2_optional_description.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  141c60a7_c7b7_a477_56d4_51892d03a401["test_strict_login_no_grant_type()"]
  7e784b87_9cdf_528d_4ae2_09349aaf6e83["test_security_oauth2_optional_description.py"]
  141c60a7_c7b7_a477_56d4_51892d03a401 -->|defined in| 7e784b87_9cdf_528d_4ae2_09349aaf6e83
  style 141c60a7_c7b7_a477_56d4_51892d03a401 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_security_oauth2_optional_description.py lines 95–107

def test_strict_login_no_grant_type():
    response = client.post("/login", data={"username": "johndoe", "password": "secret"})
    assert response.status_code == 422
    assert response.json() == {
        "detail": [
            {
                "type": "missing",
                "loc": ["body", "grant_type"],
                "msg": "Field required",
                "input": None,
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

What does test_strict_login_no_grant_type() do?
test_strict_login_no_grant_type() is a function in the fastapi codebase, defined in tests/test_security_oauth2_optional_description.py.
Where is test_strict_login_no_grant_type() defined?
test_strict_login_no_grant_type() is defined in tests/test_security_oauth2_optional_description.py at line 95.

Analyze Your Own Codebase

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

Try Supermodel Free