def on_ping_request(self): 'handler when ping request received' self.pings += 1 self.conn.send_command(Protocol.pong_response())
def test_pong_response(self): 'should return the pong protocol' self.assertEqual(Protocol.pong_response(), 'PONG\r\n')