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

Method test_https

Lib/test/test_urllib2_localnet.py:566–570  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

564 self.assertEqual(handler.requests, ["/bizarre", b"get=with_feeling"])
565
566 def test_https(self):
567 handler = self.start_https_server()
568 context = ssl.create_default_context(cafile=CERT_localhost)
569 data = self.urlopen("https://localhost:%s/bizarre" % handler.port, context=context)
570 self.assertEqual(data, b"we care a bit")
571
572 def test_https_sni(self):
573 if ssl is None:

Callers

nothing calls this directly

Calls 3

start_https_serverMethod · 0.95
urlopenMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected