diff options
author | Alexey <lesha.ogonkov@gmail.com> | 2017-12-28 00:49:46 +0300 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-01-02 11:22:59 -0500 |
commit | 0afffae4ecb660f2ecb94a756c2ab7729654ecf6 (patch) | |
tree | 70bab826d6925834a9d43b27c90a8ff592653a8b /tests/sessions_tests | |
parent | 5f456408a0f52dc16f627d4a89ced5f52c36ad2f (diff) | |
download | django-0afffae4ecb660f2ecb94a756c2ab7729654ecf6.tar.gz |
Fixed #28965 -- Updated Set-Cookie's Expires date format to follow RFC 7231.
Diffstat (limited to 'tests/sessions_tests')
-rw-r--r-- | tests/sessions_tests/tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py index 3a3af1613a..f70c8ca1e6 100644 --- a/tests/sessions_tests/tests.py +++ b/tests/sessions_tests/tests.py @@ -730,9 +730,9 @@ class SessionMiddlewareTests(TestCase): # The cookie was deleted, not recreated. # A deleted cookie header looks like: - # Set-Cookie: sessionid=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/ + # Set-Cookie: sessionid=; expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Path=/ self.assertEqual( - 'Set-Cookie: {}=""; expires=Thu, 01-Jan-1970 00:00:00 GMT; ' + 'Set-Cookie: {}=""; expires=Thu, 01 Jan 1970 00:00:00 GMT; ' 'Max-Age=0; Path=/'.format( settings.SESSION_COOKIE_NAME, ), @@ -758,11 +758,11 @@ class SessionMiddlewareTests(TestCase): # The cookie was deleted, not recreated. # A deleted cookie header with a custom domain and path looks like: # Set-Cookie: sessionid=; Domain=.example.local; - # expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; + # expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; # Path=/example/ self.assertEqual( 'Set-Cookie: {}=""; Domain=.example.local; expires=Thu, ' - '01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/example/'.format( + '01 Jan 1970 00:00:00 GMT; Max-Age=0; Path=/example/'.format( settings.SESSION_COOKIE_NAME, ), str(response.cookies[settings.SESSION_COOKIE_NAME]) |