def test_pack(self): pingd = PingD(data='hello world') self.assertEqual(b'\x00\x00\x00\x0C2hello world', pingd.pack())
def test_pingd(self): data = 'hello world' command = PingD(data=data) response = self._send_command(command.pack()) self.assertEqual(PongD(data=data).pack(), response)