MCPcopy Index your code
hub / github.com/python/cpython / test_connect_using_sslcontext

Method test_connect_using_sslcontext

Lib/test/test_smtpnet.py:68–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 2

ehloMethod · 0.80
quitMethod · 0.45

Tested by

no test coverage detected