diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-09-02 18:03:17 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-09-02 18:03:17 +0300 |
commit | 790b4f8f00285ba005816239cb242e953d60db69 (patch) | |
tree | e00dfd56fe11828c6c66c46b79338492ea1eafd5 /test/test_node_websockets.py | |
parent | 70e808040dab5013654ed1156d34bac3d36c263c (diff) | |
download | unit-790b4f8f00285ba005816239cb242e953d60db69.tar.gz unit-790b4f8f00285ba005816239cb242e953d60db69.tar.bz2 |
Tests: removed duplicate websocket tests.
Diffstat (limited to '')
-rw-r--r-- | test/test_node_websockets.py | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/test/test_node_websockets.py b/test/test_node_websockets.py index c86ae846..dcc4d7ca 100644 --- a/test/test_node_websockets.py +++ b/test/test_node_websockets.py @@ -152,27 +152,6 @@ class TestNodeWebsockets(TestApplicationNode): sock.close() - def test_node_websockets_partial_send(self): - self.load('websockets/mirror') - - message = 'blah' - - _, sock, _ = self.ws.upgrade() - - frame = self.ws.frame_to_send(self.ws.OP_TEXT, message) - sock.sendall(frame[:1]) - sock.sendall(frame[1:2]) - sock.sendall(frame[2:3]) - sock.sendall(frame[3:]) - - frame = self.ws.frame_read(sock) - - self.assertEqual( - message, frame['data'].decode('utf-8'), 'partial send' - ) - - sock.close() - def test_node_websockets_large(self): self.load('websockets/mirror_fragmentation') @@ -192,65 +171,6 @@ class TestNodeWebsockets(TestApplicationNode): sock.close() - def test_node_websockets_frame_invalid_opcode(self): - self.load('websockets/mirror') - - message = 'blah' - - _, sock, _ = self.ws.upgrade() - - self.ws.frame_write(sock, self.ws.OP_TEXT, message, fin=False) - self.ws.frame_write(sock, self.ws.OP_TEXT, message) - - frame = self.ws.frame_read(sock) - - frame.pop('data') - frame.pop('reason') - self.assertDictEqual( - frame, - { - 'fin': True, - 'rsv1': False, - 'rsv2': False, - 'rsv3': False, - 'opcode': self.ws.OP_CLOSE, - 'mask': 0, - 'code': 1002, - }, - 'close frame', - ) - - sock.close() - - def test_node_websockets_frame_invalid_opcode_2(self): - self.load('websockets/mirror') - - message = 'blah' - - _, sock, _ = self.ws.upgrade() - - self.ws.frame_write(sock, self.ws.OP_CONT, message) - - frame = self.ws.frame_read(sock) - - frame.pop('data') - self.assertDictEqual( - frame, - { - 'fin': True, - 'rsv1': False, - 'rsv2': False, - 'rsv3': False, - 'opcode': self.ws.OP_CLOSE, - 'mask': 0, - 'code': 1002, - 'reason': 'Unrecognized opcode 0', - }, - 'close frame', - ) - - sock.close() - def test_node_websockets_two_clients(self): self.load('websockets/mirror') |