def test_send_message_without_masking(self):
     tm = TextMessage(b'hello world')
     
     m = MagicMock()
     ws = WebSocket(sock=m)
     ws.send(tm)
     m.sendall.assert_called_once_with(tm.single())
Esempio n. 2
0
    def test_send_message_without_masking(self):
        tm = TextMessage(b'hello world')

        m = MagicMock()
        ws = WebSocket(sock=m)
        ws.send(tm)
        m.sendall.assert_called_once_with(tm.single())