summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul McMillan <Paul@McMillan.ws>2011-11-21 22:50:35 +0000
committerPaul McMillan <Paul@McMillan.ws>2011-11-21 22:50:35 +0000
commit16e3636a1a99c0987d8cfb266c3584fedb763992 (patch)
tree896569d6bf20091557694be8ef39cf32391f8862
parent0506facd86082f48cc3cc3d3ea253e4ebbcd0ebe (diff)
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
-rw-r--r--django/contrib/sessions/tests.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py
index 58d052d67b..9e23b5131f 100644
--- a/django/contrib/sessions/tests.py
+++ b/django/contrib/sessions/tests.py
@@ -375,11 +375,12 @@ class SessionMiddlewareTests(unittest.TestCase):
# 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):