mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
This commit is contained in:
parent
43cbbe21a7
commit
a0e5d981cd
3 changed files with 12 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue