(self)
| 1275 | self.assertRaises(smtplib.SMTPServerDisconnected, smtp.send, b'foo') |
| 1276 | |
| 1277 | def test_with_statement_QUIT_failure(self): |
| 1278 | with self.assertRaises(smtplib.SMTPResponseException) as error: |
| 1279 | with smtplib.SMTP(HOST, self.port) as smtp: |
| 1280 | smtp.noop() |
| 1281 | self.serv._SMTPchannel.quit_response = '421 QUIT FAILED' |
| 1282 | self.assertEqual(error.exception.smtp_code, 421) |
| 1283 | self.assertEqual(error.exception.smtp_error, b'QUIT FAILED') |
| 1284 | |
| 1285 | #TODO: add tests for correct AUTH method fallback now that the |
| 1286 | #test infrastructure can support it. |
nothing calls this directly
no test coverage detected