Exemplo n.º 1
0
 def test_custom_command(self):
     self.sock.sendall(b'cmd arg\r\n')
     self.sock.recv(IsA(int)).AndReturn(b'250 Ok\r\n')
     self.mox.ReplayAll()
     client = Client(self.sock)
     reply = client.custom_command(b'cmd', b'arg')
     self.assertEqual('250', reply.code)
     self.assertEqual('2.0.0 Ok', reply.message)
     self.assertEqual(b'CMD', reply.command)
 def test_custom_command(self):
     self.sock.sendall(b"cmd arg\r\n")
     self.sock.recv(IsA(int)).AndReturn(b"250 Ok\r\n")
     self.mox.ReplayAll()
     client = Client(self.sock)
     reply = client.custom_command(b"cmd", b"arg")
     self.assertEqual("250", reply.code)
     self.assertEqual("2.0.0 Ok", reply.message)
     self.assertEqual(b"CMD", reply.command)
 def test_custom_command(self):
     self.sock.sendall(b'cmd arg\r\n')
     self.sock.recv(IsA(int)).AndReturn(b'250 Ok\r\n')
     self.mox.ReplayAll()
     client = Client(self.sock)
     reply = client.custom_command(b'cmd', b'arg')
     self.assertEqual('250', reply.code)
     self.assertEqual('2.0.0 Ok', reply.message)
     self.assertEqual(b'CMD', reply.command)