From e7a92ee4cd43b6d7acf4e2fdedb20fe0e86f9620 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Mon, 9 May 2022 20:44:42 +0200 Subject: [PATCH] Document unsuported `params` on `TestClient.websocket_connect` (#1630) --- docs/testclient.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/testclient.md b/docs/testclient.md index d8d4b256..a214715f 100644 --- a/docs/testclient.md +++ b/docs/testclient.md @@ -97,6 +97,15 @@ May raise `starlette.websockets.WebSocketDisconnect` if the application does not `websocket_connect()` must be used as a context manager (in a `with` block). +!!! note + The `params` argument is not supported by `websocket_connect`. If you need to pass query arguments, hard code it + directly in the URL. + + ```python + with client.websocket_connect('/path?foo=bar') as websocket: + ... + ``` + #### Sending data * `.send_text(data)` - Send the given text to the application. -- 2.47.3