示例#1
0
 def send_connect(self):
     connect = Connect()
     self.sock.sendall(connect.pack())
     self.sock.recv(1024)
示例#2
0
 def send_connect(self):
     connect = Connect()
     self.sock.sendall(connect.pack())
     self.sock.recv(1024)
示例#3
0
 def test_connect(self):
     command = Connect()
     response = self._send_command(command.pack())
     self.assertEqual(Connected().pack(), response)
示例#4
0
 def test_pack(self):
     packet = Connect()
     self.assertEqual(b'\x00\x00\x00\x010', packet.pack())
示例#5
0
 def test_init(self):
     packet = Connect()
     self.assertEqual(CONNECT, packet.command)
示例#6
0
 def test_connect(self):
     command = Connect()
     response = self._send_command(command.pack())
     self.assertEqual(Connected().pack(), response)