(self)
| 1287 | |
| 1288 | # Issue 17498: make sure _rset does not raise SMTPServerDisconnected exception |
| 1289 | def test__rest_from_mail_cmd(self): |
| 1290 | smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', |
| 1291 | timeout=support.LOOPBACK_TIMEOUT) |
| 1292 | smtp.noop() |
| 1293 | self.serv._SMTPchannel.mail_response = '451 Requested action aborted' |
| 1294 | self.serv._SMTPchannel.disconnect = True |
| 1295 | with self.assertRaises(smtplib.SMTPSenderRefused): |
| 1296 | smtp.sendmail('John', 'Sally', 'test message') |
| 1297 | self.assertIsNone(smtp.sock) |
| 1298 | |
| 1299 | # Issue 5713: make sure close, not rset, is called if we get a 421 error |
| 1300 | def test_421_from_mail_cmd(self): |
nothing calls this directly
no test coverage detected