From e3c771f36bbec5d116181229b58182435a2da461 Mon Sep 17 00:00:00 2001 From: daftshady Date: Wed, 30 Oct 2013 01:58:01 +0900 Subject: [PATCH] added test case related to #1711 --- test_requests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test_requests.py b/test_requests.py index 3b67395..539de76 100755 --- a/test_requests.py +++ b/test_requests.py @@ -187,6 +187,14 @@ class RequestsTestCase(unittest.TestCase): assert r.json()['cookies']['foo'] == 'bar' # Make sure the session cj is still the custom one assert s.cookies is cj + + def test_param_cookiejar_works(self): + cj = cookielib.CookieJar() + cookiejar_from_dict({'foo' : 'bar'}, cj) + s = requests.session() + r = s.get(httpbin('cookies'), cookies=cj) + # Make sure the cookie was sent + assert r.json()['cookies']['foo'] == 'bar' def test_requests_in_history_are_not_overridden(self): resp = requests.get(httpbin('redirect/3')) -- 2.34.1