def test_disconnect_failure(self):
     self.sock.sendall(b'QUIT\r\n')
     self.sock.recv(IsA(int)).AndRaise(socket_error(None, None))
     self.sock.close()
     self.mox.ReplayAll()
     client = SmtpRelayClient('addr', self.queue, socket_creator=self._socket_creator, ehlo_as='test')
     client._connect()
     client._disconnect()
 def test_disconnect(self):
     self.sock.sendall(b'QUIT\r\n')
     self.sock.recv(IsA(int)).AndReturn(b'221 Goodbye\r\n')
     self.sock.close()
     self.mox.ReplayAll()
     client = SmtpRelayClient('addr', self.queue, socket_creator=self._socket_creator, ehlo_as='test')
     client._connect()
     client._disconnect()
예제 #3
0
 def test_disconnect(self):
     self.sock.sendall('QUIT\r\n')
     self.sock.recv(IsA(int)).AndReturn('221 Goodbye\r\n')
     self.sock.close()
     self.mox.ReplayAll()
     client = SmtpRelayClient(None, self.queue, socket_creator=self._socket_creator, ehlo_as='test')
     client._connect()
     client._disconnect()
예제 #4
0
 def test_disconnect_failure(self):
     self.sock.sendall('QUIT\r\n')
     self.sock.recv(IsA(int)).AndRaise(socket_error(None, None))
     self.sock.close()
     self.mox.ReplayAll()
     client = SmtpRelayClient(None, self.queue, socket_creator=self._socket_creator, ehlo_as='test')
     client._connect()
     client._disconnect()
 def test_disconnect(self):
     self.sock.sendall("QUIT\r\n")
     self.sock.recv(IsA(int)).AndReturn("221 Goodbye\r\n")
     self.sock.close()
     self.mox.ReplayAll()
     client = SmtpRelayClient(None, self.queue, socket_creator=self._socket_creator, ehlo_as="test")
     client._connect()
     client._disconnect()