test_security_http_basic_non_basic_credentials() — fastapi Function Reference
Architecture documentation for the test_security_http_basic_non_basic_credentials() function in test_security_http_basic_realm.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 8e5e7d51_46e1_d571_eef7_2f2fe20ad0e6["test_security_http_basic_non_basic_credentials()"] e7bb1a9e_9494_4347_1e34_c1bb30f0e883["test_security_http_basic_realm.py"] 8e5e7d51_46e1_d571_eef7_2f2fe20ad0e6 -->|defined in| e7bb1a9e_9494_4347_1e34_c1bb30f0e883 style 8e5e7d51_46e1_d571_eef7_2f2fe20ad0e6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_security_http_basic_realm.py lines 43–49
def test_security_http_basic_non_basic_credentials():
payload = b64encode(b"johnsecret").decode("ascii")
auth_header = f"Basic {payload}"
response = client.get("/users/me", headers={"Authorization": auth_header})
assert response.status_code == 401, response.text
assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
assert response.json() == {"detail": "Not authenticated"}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_security_http_basic_non_basic_credentials() do?
test_security_http_basic_non_basic_credentials() is a function in the fastapi codebase, defined in tests/test_security_http_basic_realm.py.
Where is test_security_http_basic_non_basic_credentials() defined?
test_security_http_basic_non_basic_credentials() is defined in tests/test_security_http_basic_realm.py at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free