| 66 | |
| 67 | @support.requires_resource('walltime') |
| 68 | def test_connect_using_sslcontext(self): |
| 69 | context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) |
| 70 | context.check_hostname = False |
| 71 | context.verify_mode = ssl.CERT_NONE |
| 72 | support.get_attribute(smtplib, 'SMTP_SSL') |
| 73 | with socket_helper.transient_internet(self.testServer): |
| 74 | server = smtplib.SMTP_SSL(self.testServer, self.remotePort, context=context) |
| 75 | server.ehlo() |
| 76 | server.quit() |
| 77 | |
| 78 | def test_connect_using_sslcontext_verified(self): |
| 79 | with socket_helper.transient_internet(self.testServer): |