mirror of
https://github.com/django/django.git
synced 2025-10-03 15:24:43 +00:00
Fix tests in 2028
staying in 2038 to not fail on 32-bit systems
This commit is contained in:
parent
cf826c9a91
commit
a92c838287
1 changed files with 2 additions and 2 deletions
|
@ -47,12 +47,12 @@ class SetCookieTests(SimpleTestCase):
|
||||||
def test_far_expiration(self):
|
def test_far_expiration(self):
|
||||||
"""Cookie will expire when a distant expiration time is provided."""
|
"""Cookie will expire when a distant expiration time is provided."""
|
||||||
response = HttpResponse()
|
response = HttpResponse()
|
||||||
response.set_cookie('datetime', expires=datetime(2028, 1, 1, 4, 5, 6))
|
response.set_cookie('datetime', expires=datetime(2038, 1, 1, 4, 5, 6))
|
||||||
datetime_cookie = response.cookies['datetime']
|
datetime_cookie = response.cookies['datetime']
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
datetime_cookie['expires'],
|
datetime_cookie['expires'],
|
||||||
# assertIn accounts for slight time dependency (#23450)
|
# assertIn accounts for slight time dependency (#23450)
|
||||||
('Sat, 01 Jan 2028 04:05:06 GMT', 'Sat, 01 Jan 2028 04:05:07 GMT')
|
('Fri, 01 Jan 2038 04:05:06 GMT', 'Fri, 01 Jan 2038 04:05:07 GMT')
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_max_age_expiration(self):
|
def test_max_age_expiration(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue