Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. tests/test_dependency_contextmanager.py

        return response
    
    
    client = TestClient(app)
    
    
    def test_async_state():
        assert state["/async"] == "asyncgen not started"
        response = client.get("/async")
        assert response.status_code == 200, response.text
        assert response.json() == "asyncgen started"
        assert state["/async"] == "asyncgen completed"
    
    
    def test_sync_state():
        assert state["/sync"] == "generator not started"
    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