browser2: Test cookie override
This commit is contained in:
parent
2d70d11822
commit
baef03c198
1 changed files with 9 additions and 0 deletions
|
|
@ -390,3 +390,12 @@ def test_cookienav():
|
||||||
# return to httpbin, check we didn't give the wrong cookie
|
# return to httpbin, check we didn't give the wrong cookie
|
||||||
r = b.location(HTTPBIN + 'cookies')
|
r = b.location(HTTPBIN + 'cookies')
|
||||||
assert 'session' not in json.loads(r.text)['cookies']
|
assert 'session' not in json.loads(r.text)['cookies']
|
||||||
|
|
||||||
|
# override cookies temporarily
|
||||||
|
r = b.location(HTTPBIN + 'cookies', cookies={'bla': 'bli'})
|
||||||
|
assert len(json.loads(r.text)['cookies']) == 1
|
||||||
|
assert json.loads(r.text)['cookies']['bla'] == 'bli'
|
||||||
|
# reload, the "fake" cookie should not be there
|
||||||
|
r = b.location(HTTPBIN + 'cookies')
|
||||||
|
assert len(json.loads(r.text)['cookies']) == 2
|
||||||
|
assert 'bla' not in json.loads(r.text)['cookies']
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue