diff options
author | Robert Collins <rbtcollins@hp.com> | 2015-08-03 22:07:06 (GMT) |
---|---|---|
committer | Robert Collins <rbtcollins@hp.com> | 2015-08-03 22:07:06 (GMT) |
commit | f3d9c315b68841d209b399c1c513cd9030d538fe (patch) | |
tree | bd1812f9777923bc338dd68d5a157c14499f305c /Lib/test/test_http_cookiejar.py | |
parent | 13b74aef6249c65e2b085a581ae9dea8c88ad8d5 (diff) | |
parent | a0e5d981cdd4f60244ae9829e38e9bc783674e9a (diff) | |
download | cpython-f3d9c315b68841d209b399c1c513cd9030d538fe.zip cpython-f3d9c315b68841d209b399c1c513cd9030d538fe.tar.gz cpython-f3d9c315b68841d209b399c1c513cd9030d538fe.tar.bz2 |
Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
Diffstat (limited to 'Lib/test/test_http_cookiejar.py')
-rw-r--r-- | Lib/test/test_http_cookiejar.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py index e9f0356..50260ff 100644 --- a/Lib/test/test_http_cookiejar.py +++ b/Lib/test/test_http_cookiejar.py @@ -566,6 +566,15 @@ class CookieTests(unittest.TestCase): self.assertEqual(len(c), 1) self.assertIn('spam="bar"', h) + # test if fractional expiry is accepted + cookie = Cookie(0, "name", "value", + None, False, "www.python.org", + True, False, "/", + False, False, "1444312383.018307", + False, None, None, + {}) + self.assertEqual(cookie.expires, 1444312383) + # XXX RFC 2965 expiry rules (some apply to V0 too) def test_default_path(self): |