Fixed Python 2.5 test failure introduced in r17135.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Paul McMillan 2011-11-21 22:50:35 +00:00
parent 0506facd86
commit 16e3636a1a
1 changed files with 6 additions and 5 deletions

View File

@ -375,11 +375,12 @@ class SessionMiddlewareTests(unittest.TestCase):
# Handle the response through the middleware # Handle the response through the middleware
response = middleware.process_response(request, response) response = middleware.process_response(request, response)
self.assertFalse( #if it isn't in the cookie, that's fine (Python 2.5).
response.cookies[settings.SESSION_COOKIE_NAME]['httponly']) if 'httponly' in settings.SESSION_COOKIE_NAME:
self.assertNotIn('httponly', self.assertFalse(
str(response.cookies[settings.SESSION_COOKIE_NAME]['httponly'])) response.cookies[settings.SESSION_COOKIE_NAME]['httponly'])
self.assertNotIn('httponly',
str(response.cookies[settings.SESSION_COOKIE_NAME]['httponly']))
class CookieSessionTests(SessionTestsMixin, TestCase): class CookieSessionTests(SessionTestsMixin, TestCase):