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.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py
index 22bf41c..853a400 100644
--- a/Lib/test/test_http_cookiejar.py
+++ b/Lib/test/test_http_cookiejar.py
@@ -585,6 +585,15 @@ class CookieTests(unittest.TestCase):
# if expires is in future, keep cookie...
c = CookieJar()
future = time2netscape(time.time()+3600)
+
+ with test.support.check_no_warnings(self):
+ headers = [f"Set-Cookie: FOO=BAR; path=/; expires={future}"]
+ req = urllib.request.Request("http://www.coyote.com/")
+ res = FakeResponse(headers, "http://www.coyote.com/")
+ cookies = c.make_cookies(res, req)
+ self.assertEqual(len(cookies), 1)
+ self.assertEqual(time2netscape(cookies[0].expires), future)
+
interact_netscape(c, "http://www.acme.com/", 'spam="bar"; expires=%s' %
future)
self.assertEqual(len(c), 1)