summaryrefslogtreecommitdiffhomepage
path: root/test/test_asgi_websockets.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-05-25 14:26:12 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2023-05-25 14:26:12 +0100
commit3e4fa1e2022970dee003bea0932ea0c10f8744ba (patch)
treed23b32b9a6e33dc57694547f1ec1427f1a19a01a /test/test_asgi_websockets.py
parent47cdfb6f30f7d56bffb806cc860e20806ea62f50 (diff)
downloadunit-3e4fa1e2022970dee003bea0932ea0c10f8744ba.tar.gz
unit-3e4fa1e2022970dee003bea0932ea0c10f8744ba.tar.bz2
Tests: removed unused variables.
Diffstat (limited to '')
-rw-r--r--test/test_asgi_websockets.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_asgi_websockets.py b/test/test_asgi_websockets.py
index b15bee43..e891b03e 100644
--- a/test/test_asgi_websockets.py
+++ b/test/test_asgi_websockets.py
@@ -19,7 +19,7 @@ class TestASGIWebsockets(TestApplicationPython):
ws = TestApplicationWebsocket()
@pytest.fixture(autouse=True)
- def setup_method_fixture(self, request, skip_alert):
+ def setup_method_fixture(self, skip_alert):
assert 'success' in self.conf(
{'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
), 'clear keepalive_interval'
@@ -73,7 +73,7 @@ class TestASGIWebsockets(TestApplicationPython):
def test_asgi_websockets_subprotocol(self):
self.load('websockets/subprotocol')
- resp, sock, key = self.ws.upgrade()
+ resp, sock, _ = self.ws.upgrade()
sock.close()
assert resp['status'] == 101, 'status'
@@ -951,7 +951,7 @@ class TestASGIWebsockets(TestApplicationPython):
_, sock, _ = self.ws.upgrade()
- for i in range(0, 2):
+ for _ in range(0, 2):
self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment1', fin=False)
self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment2', fin=False)
self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=True)
@@ -961,7 +961,7 @@ class TestASGIWebsockets(TestApplicationPython):
_, sock, _ = self.ws.upgrade()
- for i in range(0, 2):
+ for _ in range(0, 2):
self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment1', fin=True)
self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment2', fin=False)
self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=True)