Merge: #5713: One more test_smtplib timing fix.

This commit is contained in:
R David Murray 2013-03-21 00:33:30 -04:00
commit e0a1bf313f

View file

@ -831,8 +831,8 @@ def test_with_statement(self):
def test_with_statement_QUIT_failure(self):
with self.assertRaises(smtplib.SMTPResponseException) as error:
with smtplib.SMTP(HOST, self.port) as smtp:
self.serv._SMTPchannel.quit_response = '421 QUIT FAILED'
smtp.noop()
self.serv._SMTPchannel.quit_response = '421 QUIT FAILED'
self.assertEqual(error.exception.smtp_code, 421)
self.assertEqual(error.exception.smtp_error, b'QUIT FAILED')