Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_router_ws_depends_with_override (0.19 sec)

  1. tests/test_ws_router.py

    def test_router_ws_depends():
        client = TestClient(app)
        with client.websocket_connect("/router-ws-depends/") as websocket:
            assert websocket.receive_text() == "Socket Dependency"
    
    
    def test_router_ws_depends_with_override():
        client = TestClient(app)
        app.dependency_overrides[ws_dependency] = lambda: "Override"  # noqa: E731
        with client.websocket_connect("/router-ws-depends/") as websocket:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 11 19:08:14 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top