Skip to content

Commit

Permalink
Test robustness for pypy build #nolog
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jun 4, 2023
1 parent 5a5325b commit f5f2aa7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_simple_websocket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def test_make_client_headers(self, mock_wsconn, mock_socket):
client.sock.send.assert_called_with(
b"Request(host='example.com', target='/ws?a=1', extensions=[], "
b"extra_headers=[('Foo', 'Bar')], subprotocols=[])")

@mock.patch('simple_websocket.ws.socket.socket')
@mock.patch('simple_websocket.ws.WSConnection')
def test_make_client_headers2(self, mock_wsconn, mock_socket):
mock_socket.return_value.recv.return_value = b'x'
client = self.get_client(mock_wsconn, 'ws://example.com/ws?a=1',
headers=[('Foo', 'Bar'), ('Foo', 'Baz')])
client.sock.send.assert_called_with(
Expand Down

0 comments on commit f5f2aa7

Please sign in to comment.