Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for test_background_tasks_with_depends_annotated (0.58 seconds)

  1. tests/test_response_dependency.py

        assert resp.status_code == 200
        assert resp.json() == {"path": "/", "user_agent": "test-agent"}
    
    
    # Tests for BackgroundTasks type hint with Depends
    def test_background_tasks_with_depends_annotated():
        """BackgroundTasks type hint should work with Annotated[BackgroundTasks, Depends(...)]."""
        app = FastAPI()
        task_results = []
    
        def background_task(message: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 05 18:23:16 GMT 2026
    - 5.2K bytes
    - Click Count (0)
  2. tests/test_dependency_contextmanager.py

    Sebastián Ramírez <******@****.***> 1766006759 -0800
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 11.5K bytes
    - Click Count (0)
Back to Top