示例#1
0
 def test_ping(self):
     command = Ping()
     response = self._send_command(command.pack())
     self.assertEqual(Pong().pack(), response)
示例#2
0
 def test_init(self):
     ping = Ping()
     self.assertEqual(PING, ping.command)
示例#3
0
 def test_pack(self):
     ping = Ping()
     self.assertEqual(b'\x00\x00\x00\x011', ping.pack())
示例#4
0
 def test_ping(self):
     command = Ping()
     response = self._send_command(command.pack())
     self.assertEqual(Pong().pack(), response)