Loading tests/sessions_tests/tests.py +6 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ import base64 import os import shutil import string import sys import tempfile import unittest from datetime import timedelta Loading Loading @@ -604,8 +605,11 @@ class SessionMiddlewareTests(TestCase): # A deleted cookie header looks like: # 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; ' 'Max-Age=0; Path=/'.format(settings.SESSION_COOKIE_NAME), 'Set-Cookie: {}={}; expires=Thu, 01-Jan-1970 00:00:00 GMT; ' 'Max-Age=0; Path=/'.format( settings.SESSION_COOKIE_NAME, '""' if sys.version_info >= (3, 5) else '', ), str(response.cookies[settings.SESSION_COOKIE_NAME]) ) Loading Loading
tests/sessions_tests/tests.py +6 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ import base64 import os import shutil import string import sys import tempfile import unittest from datetime import timedelta Loading Loading @@ -604,8 +605,11 @@ class SessionMiddlewareTests(TestCase): # A deleted cookie header looks like: # 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; ' 'Max-Age=0; Path=/'.format(settings.SESSION_COOKIE_NAME), 'Set-Cookie: {}={}; expires=Thu, 01-Jan-1970 00:00:00 GMT; ' 'Max-Age=0; Path=/'.format( settings.SESSION_COOKIE_NAME, '""' if sys.version_info >= (3, 5) else '', ), str(response.cookies[settings.SESSION_COOKIE_NAME]) ) Loading