(self)
| 1157 | self.assertEqual(resp, (235, b'Authentication Succeeded')) |
| 1158 | |
| 1159 | def testAUTH_BUGGY(self): |
| 1160 | self.serv.add_feature("AUTH BUGGY") |
| 1161 | |
| 1162 | def auth_buggy(challenge=None): |
| 1163 | self.assertEqual(b"BuGgYbUgGy", challenge) |
| 1164 | return "\0" |
| 1165 | |
| 1166 | smtp = smtplib.SMTP( |
| 1167 | HOST, self.port, local_hostname='localhost', |
| 1168 | timeout=support.LOOPBACK_TIMEOUT |
| 1169 | ) |
| 1170 | try: |
| 1171 | smtp.user, smtp.password = sim_auth |
| 1172 | smtp.ehlo("test_auth_buggy") |
| 1173 | expect = r"^Server AUTH mechanism infinite loop.*" |
| 1174 | with self.assertRaisesRegex(smtplib.SMTPException, expect) as cm: |
| 1175 | smtp.auth("BUGGY", auth_buggy, initial_response_ok=False) |
| 1176 | finally: |
| 1177 | smtp.close() |
| 1178 | |
| 1179 | @hashlib_helper.requires_hashdigest('md5', openssl=True) |
| 1180 | def testAUTH_CRAM_MD5(self): |
nothing calls this directly
no test coverage detected