diff options
| author | Bernhard M. Wiedemann <githubbmw@lsmod.de> | 2019-02-14 14:44:41 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-02-14 09:44:41 -0500 |
| commit | 5a465df70d38b57b8e445263a10b4557d8056623 (patch) | |
| tree | 53b1e3be6e3c9cad7937ee1747a6956e066a3115 /tests/responses | |
| parent | ed7dee55a94b7243bc2757fd88055a1c7a87a79d (diff) | |
Made a requests test that will fail in 2028 fail 10 years later.
2038 is chosen for compatibility with 32-bit systems.
Diffstat (limited to 'tests/responses')
| -rw-r--r-- | tests/responses/test_cookie.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/responses/test_cookie.py b/tests/responses/test_cookie.py index a5092c3bbf..a46d910f34 100644 --- a/tests/responses/test_cookie.py +++ b/tests/responses/test_cookie.py @@ -47,12 +47,12 @@ class SetCookieTests(SimpleTestCase): def test_far_expiration(self): """Cookie will expire when a distant expiration time is provided.""" 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'] self.assertIn( datetime_cookie['expires'], # 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): |
