From 98dc7e2b059edf1dcdf33d88b1897236eca1a956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20R=2E=20Sede=C3=B1o?= Date: Sat, 19 Nov 2022 09:19:01 -0500 Subject: [PATCH] urllib.quote.parse handles encoding to UTF-8 for us MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro R. Sedeño Signed-off-by: Alejandro R Sedeño --- tests/test_websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_websocket.py b/tests/test_websocket.py index 20dacc59..851143c8 100644 --- a/tests/test_websocket.py +++ b/tests/test_websocket.py @@ -198,7 +198,7 @@ def test_root_path(self, *, daphne_path): """ Tests root_path handling. """ - headers = [("Daphne-Root-Path", parse.quote(daphne_path.encode("ascii")))] + headers = [("Daphne-Root-Path", parse.quote(daphne_path))] with DaphneTestingInstance() as test_app: test_app.add_send_messages([{"type": "websocket.accept"}]) self.websocket_handshake(