コード例 #1
0
 def test_connection_reset_during_command(self):
     with SMTP(*self.address) as client:
         client.helo('example.com')
         # Start sending a command but reset the connection before that
         # completes, i.e. before the \r\n
         client.send('MAIL FROM: <anne')
         reset_connection(client)
         # The connection should be disconnected, so trying to do another
         # command from here will give us an exception.  In GH#62, the
         # server just hung.
         self.assertRaises(SMTPServerDisconnected, client.noop)
コード例 #2
0
ファイル: test_smtp.py プロジェクト: kozzztik/aiosmtpd
 def test_connection_reset_during_command(self):
     with SMTP(*self.address) as client:
         client.helo('example.com')
         # Start sending a command but reset the connection before that
         # completes, i.e. before the \r\n
         client.send('MAIL FROM: <anne')
         reset_connection(client)
         # The connection should be disconnected, so trying to do another
         # command from here will give us an exception.  In GH#62, the
         # server just hung.
         self.assertRaises(SMTPServerDisconnected, client.noop)