projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ff8d43
)
Add another session cookie test
author
Chase Sterling
<chase.sterling@gmail.com>
Fri, 26 Apr 2013 03:11:43 +0000
(23:11 -0400)
committer
Chase Sterling
<chase.sterling@gmail.com>
Fri, 26 Apr 2013 03:11:43 +0000
(23:11 -0400)
test_requests.py
patch
|
blob
|
history
diff --git
a/test_requests.py
b/test_requests.py
index
c0ed58d
..
9339476
100644
(file)
--- a/
test_requests.py
+++ b/
test_requests.py
@@
-138,6
+138,14
@@
class RequestsTestCase(unittest.TestCase):
)
assert 'foo' not in s.cookies
+ def test_request_cookie_overrides_session_cookie(self):
+ s = requests.session()
+ s.cookies['foo'] = 'bar'
+ r = s.get(httpbin('cookies'), cookies={'foo': 'baz'})
+ assert r.json()['cookies']['foo'] == 'baz'
+ # Session cookie should not be modified
+ assert s.cookies['foo'] == 'bar'
+
def test_generic_cookiejar_works(self):
cj = cookielib.CookieJar()
cookiejar_from_dict({'foo': 'bar'}, cj)