Exemplo n.º 1
0
    def test_sending_ping(self):
        tm = PingControlMessage("hello").single(mask=False)

        m = MagicMock()
        ws = WebSocket(sock=m)
        ws.ping("hello")
        m.sendall.assert_called_once_with(tm)
 def test_sending_ping(self):
     tm = PingControlMessage("hello").single(mask=False)
     
     m = MagicMock()
     ws = WebSocket(sock=m)
     ws.ping("hello")
     m.sendall.assert_called_once_with(tm)