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

Class FakeResponse

Lib/test/test_http_cookiejar.py:315–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313
314
315class FakeResponse:
316 def __init__(self, headers=[], url=None):
317 """
318 headers: list of RFC822-style 'Key: value' strings
319 """
320 import email
321 self._headers = email.message_from_string("\n".join(headers))
322 self._url = url
323 def info(self): return self._headers
324
325def interact_2965(cookiejar, url, *set_cookie_hdrs):
326 return _interact(cookiejar, url, set_cookie_hdrs, "Set-Cookie2")

Callers 13

_interactFunction · 0.85
test_expiresMethod · 0.85
test_domain_allowMethod · 0.85
test_domain_blockMethod · 0.85
test_secure_blockMethod · 0.85
test_netscape_miscMethod · 0.85
test_empty_pathMethod · 0.85

Calls

no outgoing calls

Tested by 13

_interactFunction · 0.68
test_expiresMethod · 0.68
test_domain_allowMethod · 0.68
test_domain_blockMethod · 0.68
test_secure_blockMethod · 0.68
test_netscape_miscMethod · 0.68
test_empty_pathMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…