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

Class MockHTTPSHandler

Lib/test/test_urllib2.py:528–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526
527if hasattr(http.client, 'HTTPSConnection'):
528 class MockHTTPSHandler(urllib.request.HTTPSHandler):
529 # Useful for testing the Proxy-Authorization request by verifying the
530 # properties of httpcon
531
532 def __init__(self, debuglevel=None, context=None, check_hostname=None):
533 super(MockHTTPSHandler, self).__init__(debuglevel, context, check_hostname)
534 self.httpconn = MockHTTPClass()
535
536 def https_open(self, req):
537 return self.do_open(self.httpconn, req)
538
539
540class MockHTTPHandlerCheckAuth(urllib.request.BaseHandler):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…