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

Method fakehttp

Lib/test/test_urllib.py:86–89  ·  view source on GitHub ↗
(self, fakedata, mock_close=False)

Source from the content-addressed store, hash-verified

84
85class FakeHTTPMixin(object):
86 def fakehttp(self, fakedata, mock_close=False):
87 fake_http_class = fakehttp(fakedata, mock_close=mock_close)
88 self._connection_class = http.client.HTTPConnection
89 http.client.HTTPConnection = fake_http_class
90
91 def unfakehttp(self):
92 http.client.HTTPConnection = self._connection_class

Calls 1

fakehttpFunction · 0.85

Tested by

no test coverage detected