Skip to content

Commit dd7f81b

Browse files
committed
Fixed: httpbingo.org changed their response format.
1 parent a73f2fe commit dd7f81b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_urihandler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def test_set_cookie(self):
359359

360360
# verify the values from the json data
361361
data = json.loads(data)
362-
cookie_value_retrieved = data[cookie_name]
362+
cookie_value_retrieved = data.get("cookies", {}).get(cookie_name)
363363
self.assertEqual(cookie_value, cookie_value_retrieved)
364364

365365
def test_set_cookie_with_cache(self):
@@ -420,7 +420,7 @@ def test_set_cookie_file(self):
420420

421421
# verify the values from the json data
422422
data = json.loads(data)
423-
cookie_value_retrieved = data[cookie_name]
423+
cookie_value_retrieved = data.get("cookies", {}).get(cookie_name)
424424
self.assertEqual(cookie_value, cookie_value_retrieved)
425425

426426
def test_cookie_persist(self):

0 commit comments

Comments
 (0)