Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ MockFile
Class
MockFile
Lib/test/test_urllib2.py:284–292 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
282
283
284
class
MockFile:
285
def
read(self, count=None):
286
pass
287
288
def
readline(self, count=None):
289
pass
290
291
def
close(self):
292
pass
293
294
295
class
MockHeaders(dict):
Callers
8
getresponse
Method · 0.70
http_open
Method · 0.70
http_open
Method · 0.70
test_redirect
Method · 0.70
redirect
Method · 0.70
test_invalid_redirect
Method · 0.70
test_relative_redirect
Method · 0.70
test_redirect_head_request
Method · 0.70
Calls
no outgoing calls
Tested by
8
getresponse
Method · 0.56
http_open
Method · 0.56
http_open
Method · 0.56
test_redirect
Method · 0.56
redirect
Method · 0.56
test_invalid_redirect
Method · 0.56
test_relative_redirect
Method · 0.56
test_redirect_head_request
Method · 0.56
Used in the wild
real call sites across dependent graphs
searching dependent graphs…