(self)
| 1308 | self.assertEqual(self.serv._SMTPchannel.rset_count, 0) |
| 1309 | |
| 1310 | def test_421_from_rcpt_cmd(self): |
| 1311 | smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', |
| 1312 | timeout=support.LOOPBACK_TIMEOUT) |
| 1313 | smtp.noop() |
| 1314 | self.serv._SMTPchannel.rcpt_response = ['250 accepted', '421 closing'] |
| 1315 | with self.assertRaises(smtplib.SMTPRecipientsRefused) as r: |
| 1316 | smtp.sendmail('John', ['Sally', 'Frank', 'George'], 'test message') |
| 1317 | self.assertIsNone(smtp.sock) |
| 1318 | self.assertEqual(self.serv._SMTPchannel.rset_count, 0) |
| 1319 | self.assertDictEqual(r.exception.args[0], {'Frank': (421, b'closing')}) |
| 1320 | |
| 1321 | def test_421_from_data_cmd(self): |
| 1322 | class MySimSMTPChannel(SimSMTPChannel): |
nothing calls this directly
no test coverage detected