You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

429 B

Testing WebSockets

You can use the same TestClient to test WebSockets.

For this, you use the TestClient in a with statement, connecting to the WebSocket:

{* ../../docs_src/app_testing/tutorial002.py hl[27:31] *}

/// note

For more details, check Starlette's documentation for testing WebSockets.

///