test_strict_login_incorrect_grant_type() — fastapi Function Reference
Architecture documentation for the test_strict_login_incorrect_grant_type() function in test_security_oauth2.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 5ae66f70_c0c7_b188_55c6_10df909e4215["test_strict_login_incorrect_grant_type()"] 7f052231_a8b6_745a_4286_d97e2324b661["test_security_oauth2.py"] 5ae66f70_c0c7_b188_55c6_10df909e4215 -->|defined in| 7f052231_a8b6_745a_4286_d97e2324b661 style 5ae66f70_c0c7_b188_55c6_10df909e4215 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_security_oauth2.py lines 114–130
def test_strict_login_incorrect_grant_type(grant_type: str):
response = client.post(
"/login",
data={"username": "johndoe", "password": "secret", "grant_type": grant_type},
)
assert response.status_code == 422
assert response.json() == {
"detail": [
{
"type": "string_pattern_mismatch",
"loc": ["body", "grant_type"],
"msg": "String should match pattern '^password$'",
"input": grant_type,
"ctx": {"pattern": "^password$"},
}
]
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_strict_login_incorrect_grant_type() do?
test_strict_login_incorrect_grant_type() is a function in the fastapi codebase, defined in tests/test_security_oauth2.py.
Where is test_strict_login_incorrect_grant_type() defined?
test_strict_login_incorrect_grant_type() is defined in tests/test_security_oauth2.py at line 114.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free