Author: PaulM
Date: 2011-11-21 14:50:35 -0800 (Mon, 21 Nov 2011)
New Revision: 17137

Modified:
   django/trunk/django/contrib/sessions/tests.py
Log:
Fixed Python 2.5 test failure introduced in r17135.


Modified: django/trunk/django/contrib/sessions/tests.py
===================================================================
--- django/trunk/django/contrib/sessions/tests.py       2011-11-21 22:25:49 UTC 
(rev 17136)
+++ django/trunk/django/contrib/sessions/tests.py       2011-11-21 22:50:35 UTC 
(rev 17137)
@@ -375,12 +375,13 @@
 
         # 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):
 
     backend = CookieSession

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to