MCPcopy
hub / github.com/psf/requests / test_param_cookiejar_works

Method test_param_cookiejar_works

tests/test_requests.py:442–448  ·  view source on GitHub ↗
(self, httpbin)

Source from the content-addressed store, hash-verified

440 assert s.cookies is cj
441
442 def test_param_cookiejar_works(self, httpbin):
443 cj = cookielib.CookieJar()
444 cookiejar_from_dict({"foo": "bar"}, cj)
445 s = requests.session()
446 r = s.get(httpbin("cookies"), cookies=cj)
447 # Make sure the cookie was sent
448 assert r.json()["cookies"]["foo"] == "bar"
449
450 def test_cookielib_cookiejar_on_redirect(self, httpbin):
451 """Tests resolve_redirect doesn't fail when merging cookies

Callers

nothing calls this directly

Calls 4

cookiejar_from_dictFunction · 0.90
httpbinFunction · 0.85
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected