diff options
-rw-r--r-- | test/test_node_websockets.py | 2 | ||||
-rw-r--r-- | test/unit/applications/websockets.py | 12 |
2 files changed, 3 insertions, 11 deletions
diff --git a/test/test_node_websockets.py b/test/test_node_websockets.py index dcc4d7ca..86964ce0 100644 --- a/test/test_node_websockets.py +++ b/test/test_node_websockets.py @@ -386,7 +386,6 @@ class TestNodeWebsockets(TestApplicationNode): # validation for websocket frames. It should be implemented # by application, if necessary. - @unittest.skip('not yet') def test_node_websockets_1_1_1__1_1_8(self): self.load('websockets/mirror') @@ -413,7 +412,6 @@ class TestNodeWebsockets(TestApplicationNode): self.close_connection(sock) - @unittest.skip('not yet') def test_node_websockets_1_2_1__1_2_8(self): self.load('websockets/mirror') diff --git a/test/unit/applications/websockets.py b/test/unit/applications/websockets.py index 3553af6e..5f9c3c51 100644 --- a/test/unit/applications/websockets.py +++ b/test/unit/applications/websockets.py @@ -61,15 +61,9 @@ class TestApplicationWebsocket(TestApplicationProto): def recv_bytes(sock, bytes): data = b'' while select.select([sock], [], [], read_timeout)[0]: - try: - if bytes < 65536: - data = sock.recv(bytes) - else: - data = self.recvall( - sock, read_timeout=read_timeout, buff_size=bytes - ) - break - except: + data += sock.recv(bytes - len(data)) + + if len(data) == bytes: break return data |