- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for prefix_router2 (0.07 sec)
-
tests/test_ws_dependencies.py
app.include_router(router, dependencies=[create_dependency("router2")]) app.include_router( prefix_router, prefix="/prefix", dependencies=[create_dependency("prefix_router2")] ) def test_index(): client = TestClient(app) with client.websocket_connect("/") as websocket: data = json.loads(websocket.receive_text()) assert data == ["app", "index"] def test_routerindex():
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 20:35:39 UTC 2023 - 2.1K bytes - Viewed (1) -
tests/test_ws_router.py
Depends, FastAPI, Header, WebSocket, WebSocketDisconnect, status, ) from fastapi.middleware import Middleware from fastapi.testclient import TestClient router = APIRouter() prefix_router = APIRouter() native_prefix_route = APIRouter(prefix="/native") app = FastAPI() @app.websocket_route("/") async def index(websocket: WebSocket): await websocket.accept()
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 7.5K bytes - Viewed (0)