Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 16e3636a1a99c0987d8cfb266c3584fedb763992 1 parent 0506fac
@PaulMcMillan PaulMcMillan authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 django/contrib/sessions/tests.py
View
11 django/contrib/sessions/tests.py
@@ -375,11 +375,12 @@ def test_no_httponly_session_cookie(self):
# Handle the response through the middleware
response = middleware.process_response(request, response)
- self.assertFalse(
- response.cookies[settings.SESSION_COOKIE_NAME]['httponly'])
- self.assertNotIn('httponly',
- str(response.cookies[settings.SESSION_COOKIE_NAME]['httponly']))
-
+ #if it isn't in the cookie, that's fine (Python 2.5).
+ if 'httponly' in settings.SESSION_COOKIE_NAME:
+ self.assertFalse(
+ response.cookies[settings.SESSION_COOKIE_NAME]['httponly'])
+ self.assertNotIn('httponly',
+ str(response.cookies[settings.SESSION_COOKIE_NAME]['httponly']))
class CookieSessionTests(SessionTestsMixin, TestCase):
Please sign in to comment.
Something went wrong with that request. Please try again.