(self)
| 1070 | smtp.quit() |
| 1071 | |
| 1072 | def testEHLO(self): |
| 1073 | smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', |
| 1074 | timeout=support.LOOPBACK_TIMEOUT) |
| 1075 | |
| 1076 | # no features should be present before the EHLO |
| 1077 | self.assertEqual(smtp.esmtp_features, {}) |
| 1078 | |
| 1079 | # features expected from the test server |
| 1080 | expected_features = {'expn':'', |
| 1081 | 'size': '20000000', |
| 1082 | 'starttls': '', |
| 1083 | 'deliverby': '', |
| 1084 | 'help': '', |
| 1085 | } |
| 1086 | |
| 1087 | smtp.ehlo() |
| 1088 | self.assertEqual(smtp.esmtp_features, expected_features) |
| 1089 | for k in expected_features: |
| 1090 | self.assertTrue(smtp.has_extn(k)) |
| 1091 | self.assertFalse(smtp.has_extn('unsupported-feature')) |
| 1092 | smtp.quit() |
| 1093 | |
| 1094 | def testVRFY(self): |
| 1095 | smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', |
nothing calls this directly
no test coverage detected