mirror of
https://github.com/django/daphne.git
synced 2025-09-10 17:32:27 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
0cb34c063b
commit
3039fb72db
|
@ -138,6 +138,7 @@ class TestWebsocket(DaphneTestCase):
|
||||||
scope, messages = test_app.get_received()
|
scope, messages = test_app.get_received()
|
||||||
self.assert_valid_websocket_scope(scope, subprotocols=subprotocols)
|
self.assert_valid_websocket_scope(scope, subprotocols=subprotocols)
|
||||||
self.assert_valid_websocket_connect_message(messages[0])
|
self.assert_valid_websocket_connect_message(messages[0])
|
||||||
|
|
||||||
def test_invalid_subprotocols(self):
|
def test_invalid_subprotocols(self):
|
||||||
"""
|
"""
|
||||||
Tests that the server rejects connections with invalid subprotocols.
|
Tests that the server rejects connections with invalid subprotocols.
|
||||||
|
@ -146,7 +147,7 @@ class TestWebsocket(DaphneTestCase):
|
||||||
test_app.add_send_messages([{"type": "websocket.accept"}])
|
test_app.add_send_messages([{"type": "websocket.accept"}])
|
||||||
with self.assertRaises(TypeError):
|
with self.assertRaises(TypeError):
|
||||||
self.websocket_handshake(test_app, subprotocols=[1, 2])
|
self.websocket_handshake(test_app, subprotocols=[1, 2])
|
||||||
|
|
||||||
def test_xff(self):
|
def test_xff(self):
|
||||||
"""
|
"""
|
||||||
Tests that X-Forwarded-For headers get parsed right
|
Tests that X-Forwarded-For headers get parsed right
|
||||||
|
|
Loading…
Reference in New Issue
Block a user