test_two_scopes() — fastapi Function Reference
Architecture documentation for the test_two_scopes() function in test_dependency_yield_scope_websockets.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 18da9858_bf76_a67c_ee1f_5c39be9aaded["test_two_scopes()"] 52f88bfc_80aa_a753_1eee_72d574fc4932["test_dependency_yield_scope_websockets.py"] 18da9858_bf76_a67c_ee1f_5c39be9aaded -->|defined in| 52f88bfc_80aa_a753_1eee_72d574fc4932 style 18da9858_bf76_a67c_ee1f_5c39be9aaded fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_dependency_yield_scope_websockets.py lines 148–155
def test_two_scopes() -> None:
global_context.set({})
global_state = global_context.get()
with client.websocket_connect("/two-scopes") as websocket:
data = websocket.receive_json()
assert data["func_is_open"] is True
assert data["req_is_open"] is True
assert global_state["session_closed"] is True
Domain
Subdomains
Source
Frequently Asked Questions
What does test_two_scopes() do?
test_two_scopes() is a function in the fastapi codebase, defined in tests/test_dependency_yield_scope_websockets.py.
Where is test_two_scopes() defined?
test_two_scopes() is defined in tests/test_dependency_yield_scope_websockets.py at line 148.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free