test_dependency_gets_exception() — fastapi Function Reference
Architecture documentation for the test_dependency_gets_exception() function in test_dependency_yield_except_httpexception.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD f708c13e_298b_f5ca_8e99_4c2470865b4c["test_dependency_gets_exception()"] f6f3823e_de1c_c0d8_8c4a_03fc7fc4718a["test_dependency_yield_except_httpexception.py"] f708c13e_298b_f5ca_8e99_4c2470865b4c -->|defined in| f6f3823e_de1c_c0d8_8c4a_03fc7fc4718a style f708c13e_298b_f5ca_8e99_4c2470865b4c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_dependency_yield_except_httpexception.py lines 53–61
def test_dependency_gets_exception():
assert state["except"] is False
assert state["finally"] is False
response = client.put("/invalid-user/rick", json="Morty")
assert response.status_code == 400, response.text
assert response.json() == {"detail": "Invalid user"}
assert state["except"] is True
assert state["finally"] is True
assert fake_database["rick"] == "Rick Sanchez"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_dependency_gets_exception() do?
test_dependency_gets_exception() is a function in the fastapi codebase, defined in tests/test_dependency_yield_except_httpexception.py.
Where is test_dependency_gets_exception() defined?
test_dependency_gets_exception() is defined in tests/test_dependency_yield_except_httpexception.py at line 53.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free