test_sync_background_tasks() — fastapi Function Reference
Architecture documentation for the test_sync_background_tasks() function in test_dependency_contextmanager.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD cdb28050_796b_429f_7865_3315ce30c2d9["test_sync_background_tasks()"] 952bbb41_0c47_a7fe_aee8_884380d032f7["test_dependency_contextmanager.py"] cdb28050_796b_429f_7865_3315ce30c2d9 -->|defined in| 952bbb41_0c47_a7fe_aee8_884380d032f7 style cdb28050_796b_429f_7865_3315ce30c2d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_dependency_contextmanager.py lines 391–399
def test_sync_background_tasks():
response = client.get("/sync_context_b_bg")
data = response.json()
assert data["context_b"] == "started b"
assert data["context_a"] == "started a"
assert data["sync_bg"] == "not set"
assert state["context_b"] == "finished b with a: started a"
assert state["context_a"] == "finished a"
assert state["sync_bg"] == "sync_bg set - b: started b - a: started a"
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_sync_background_tasks() do?
test_sync_background_tasks() is a function in the fastapi codebase, defined in tests/test_dependency_contextmanager.py.
Where is test_sync_background_tasks() defined?
test_sync_background_tasks() is defined in tests/test_dependency_contextmanager.py at line 391.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free