test_broken_scope() — fastapi Function Reference
Architecture documentation for the test_broken_scope() function in test_dependency_yield_scope.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD c4745937_ff97_c625_c45b_e6468e23e751["test_broken_scope()"] 1d6a5359_eb63_e124_a768_36c861660b1a["test_dependency_yield_scope.py"] c4745937_ff97_c625_c45b_e6468e23e751 -->|defined in| 1d6a5359_eb63_e124_a768_36c861660b1a style c4745937_ff97_c625_c45b_e6468e23e751 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_dependency_yield_scope.py lines 182–190
def test_broken_scope() -> None:
with pytest.raises(
FastAPIError,
match='The dependency "get_named_func_session" has a scope of "request", it cannot depend on dependencies with scope "function"',
):
@app.get("/broken-scope")
def get_broken(sessions: BrokenSessionsDep) -> Any: # pragma: no cover
pass
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_broken_scope() do?
test_broken_scope() is a function in the fastapi codebase, defined in tests/test_dependency_yield_scope.py.
Where is test_broken_scope() defined?
test_broken_scope() is defined in tests/test_dependency_yield_scope.py at line 182.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free