From 60fe2b19e895f0e54a577a0bca86e0dba0926d7b Mon Sep 17 00:00:00 2001 From: Rafael de Oliveira Marques Date: Thu, 15 Aug 2024 17:36:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Add=20Portuguese=20translation?= =?UTF-8?q?=20for=20`docs/pt/docs/advanced/testing-websockets.md`=20(#1199?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pt/docs/advanced/testing-websockets.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/pt/docs/advanced/testing-websockets.md diff --git a/docs/pt/docs/advanced/testing-websockets.md b/docs/pt/docs/advanced/testing-websockets.md new file mode 100644 index 000000000..f458a05d4 --- /dev/null +++ b/docs/pt/docs/advanced/testing-websockets.md @@ -0,0 +1,15 @@ +# Testando WebSockets + +Você pode usar o mesmo `TestClient` para testar WebSockets. + +Para isso, você utiliza o `TestClient` dentro de uma instrução `with`, conectando com o WebSocket: + +```Python hl_lines="27-31" +{!../../../docs_src/app_testing/tutorial002.py!} +``` + +/// note | "Nota" + +Para mais detalhes, confira a documentação do Starlette para testar WebSockets. + +///