mirror of https://github.com/tiangolo/fastapi.git
457 B
457 B
Probando WebSockets
Puedes usar el mismo TestClient para probar WebSockets.
Para esto, usas el TestClient en un statement with, conectándote al WebSocket:
{* ../../docs_src/app_testing/tutorial002.py hl[27:31] *}
/// note | Nota
Para más detalles, revisa la documentación de Starlette sobre probando sesiones WebSocket.
///