From: daftshady Date: Tue, 29 Oct 2013 16:58:01 +0000 (+0900) Subject: added test case related to #1711 X-Git-Tag: v2.1.0~11^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3c771f36bbec5d116181229b58182435a2da461;p=services%2Fpython-requests.git added test case related to #1711 --- 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'))