Skip to content

Commit eb4d50a

Browse files
committed
Change threaded client test to test ssl socket
1 parent b31bcda commit eb4d50a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/test_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,13 @@ class ThreadedClientTest(unittest.TestCase):
218218
@patch('ws4py.client.socket')
219219
def test_thread_is_started_once_connected(self, sock):
220220
s = MagicMock(spec=socket.socket)
221+
s.pending = lambda: False
221222
sock.socket.return_value = s
222223
sock.getaddrinfo.return_value = [(socket.AF_INET, socket.SOCK_STREAM, 0, "",
223224
("127.0.0.1", 80, 0, 0))]
224225

225226
c = WebSocketClient(url="ws://127.0.0.1/")
227+
c._is_secure = True
226228

227229
def exchange1(*args, **kwargs):
228230
yield b"\r\n".join([

0 commit comments

Comments
 (0)