summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_http_cookiejar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_http_cookiejar.py')
-rw-r--r--Lib/test/test_http_cookiejar.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py
index 99d038f..fdf15ef 100644
--- a/Lib/test/test_http_cookiejar.py
+++ b/Lib/test/test_http_cookiejar.py
@@ -1773,6 +1773,10 @@ class LWPCookieTests(unittest.TestCase):
interact_netscape(c, "http://www.foo.com/",
"fooc=bar; Domain=www.foo.com; %s" % expires)
+ for cookie in c:
+ if cookie.name == "foo1":
+ cookie.set_nonstandard_attr("HTTPOnly", "")
+
def save_and_restore(cj, ignore_discard):
try:
cj.save(ignore_discard=ignore_discard)
@@ -1787,6 +1791,7 @@ class LWPCookieTests(unittest.TestCase):
new_c = save_and_restore(c, True)
self.assertEqual(len(new_c), 6) # none discarded
self.assertIn("name='foo1', value='bar'", repr(new_c))
+ self.assertIn("rest={'HTTPOnly': ''}", repr(new_c))
new_c = save_and_restore(c, False)
self.assertEqual(len(new_c), 4) # 2 of them discarded on save