Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_background_tasks (0.08 sec)

  1. tests/test_dependency_contextmanager.py

        with pytest.raises(OtherDependencyError):
            client.get("/context_b_raise")
        assert state["context_b"] == "finished b with a: started a"
        assert state["context_a"] == "finished a"
    
    
    def test_background_tasks():
        response = client.get("/context_b_bg")
        data = response.json()
        assert data["context_b"] == "started b"
        assert data["context_a"] == "started a"
        assert data["bg"] == "not set"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 11.6K bytes
    - Viewed (0)
Back to top