From 737d25423ca6c865424598dd77c760b4c807b034 Mon Sep 17 00:00:00 2001
From: euri10 <benoit.barthelet@gmail.com>
Date: Sun, 13 Dec 2020 14:24:12 +0100
Subject: [PATCH] Up wsproto to 1.0.0
---
requirements.txt | 2 +-
tests/protocols/test_http.py | 1 +
tests/protocols/test_websocket.py | 6 +++++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index a739e05..bcc6b7d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
-e .[standard]
# Explicit optionals
-wsproto==0.15.*
+wsproto==1.0.*
# Packaging
twine
diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py
index f35a965..25110fc 100644
--- a/tests/protocols/test_http.py
+++ b/tests/protocols/test_http.py
@@ -67,6 +67,7 @@ UPGRADE_REQUEST = b"\r\n".join(
b"Host: example.org",
b"Connection: upgrade",
b"Upgrade: websocket",
+ b"Sec-WebSocket-Version: 11",
b"",
b"",
]
diff --git a/tests/protocols/test_websocket.py b/tests/protocols/test_websocket.py
index 24bc285..7c3fcc0 100644
--- a/tests/protocols/test_websocket.py
+++ b/tests/protocols/test_websocket.py
@@ -51,7 +51,11 @@ async def test_invalid_upgrade(protocol_cls):
async with httpx.AsyncClient() as client:
response = await client.get(
"http://127.0.0.1:8000",
- headers={"upgrade": "websocket", "connection": "upgrade"},
+ headers={
+ "upgrade": "websocket",
+ "connection": "upgrade",
+ "sec-webSocket-version": "11",
+ },
timeout=5,
)
if response.status_code == 426:
--
2.29.2