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

Method test_connect_using_sslcontext_verified

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

Source from the content-addressed store, hash-verified

76 server.quit()
77
78 def test_connect_using_sslcontext_verified(self):
79 with socket_helper.transient_internet(self.testServer):
80 can_verify = check_ssl_verifiy(self.testServer, self.remotePort)
81 if not can_verify:
82 self.skipTest("SSL certificate can't be verified")
83
84 support.get_attribute(smtplib, 'SMTP_SSL')
85 context = ssl.create_default_context()
86 with socket_helper.transient_internet(self.testServer):
87 server = smtplib.SMTP_SSL(self.testServer, self.remotePort, context=context)
88 server.ehlo()
89 server.quit()
90
91
92if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

check_ssl_verifiyFunction · 0.85
skipTestMethod · 0.80
ehloMethod · 0.80
quitMethod · 0.45

Tested by

no test coverage detected