]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Document unsuported `params` on `TestClient.websocket_connect` (#1630)
authorMarcelo Trylesinski <marcelotryle@gmail.com>
Mon, 9 May 2022 18:44:42 +0000 (20:44 +0200)
committerGitHub <noreply@github.com>
Mon, 9 May 2022 18:44:42 +0000 (20:44 +0200)
docs/testclient.md

index d8d4b256edb7217dda89d1039632ef96244d2b4e..a214715fe765fcf1119aead8a357f26cdb93e8ce 100644 (file)
@@ -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.