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

Method start_https_server

Lib/test/test_urllib2_localnet.py:498–507  ·  view source on GitHub ↗
(self, responses=None, **kwargs)

Source from the content-addressed store, hash-verified

496 return handler
497
498 def start_https_server(self, responses=None, **kwargs):
499 if not hasattr(urllib.request, 'HTTPSHandler'):
500 self.skipTest('ssl support required')
501 from test.ssl_servers import make_https_server
502 if responses is None:
503 responses = [(200, [], b"we care a bit")]
504 handler = GetRequestHandler(responses)
505 server = make_https_server(self, handler_class=handler, **kwargs)
506 handler.port = server.port
507 return handler
508
509 def test_redirection(self):
510 expected_response = b"We got here..."

Callers 2

test_httpsMethod · 0.95
test_https_sniMethod · 0.95

Calls 3

make_https_serverFunction · 0.90
GetRequestHandlerFunction · 0.85
skipTestMethod · 0.80

Tested by

no test coverage detected