You can use the same TestClient to test WebSockets.
TestClient
For this, you use the TestClient in a with statement, connecting to the WebSocket:
with
{!./src/app_testing/tutorial002.py!}