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

Class MockHTTPHandler

Lib/test/test_urllib2.py:488–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486
487
488class MockHTTPHandler(urllib.request.HTTPHandler):
489 # Very simple mock HTTP handler with no special behavior other than using a mock HTTP connection
490
491 def __init__(self, debuglevel=None):
492 super(MockHTTPHandler, self).__init__(debuglevel=debuglevel)
493 self.httpconn = MockHTTPClass()
494
495 def http_open(self, req):
496 return self.do_open(self.httpconn, req)
497
498
499class MockHTTPHandlerRedirect(urllib.request.BaseHandler):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…