summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul McMillan <Paul@McMillan.ws>2011-10-05 05:21:47 +0000
committerPaul McMillan <Paul@McMillan.ws>2011-10-05 05:21:47 +0000
commit1ac2bb9b8e299e82e64d77cd97028dc907342dd8 (patch)
tree320c22e0b4b4fe7417c85ea7a07bf4983c70bd3f
parent749f0721c4ebe14f0007ae56cc31bd7bae34ba66 (diff)
Fixed #16987 -- Improved error message for session tests. Thanks jMyles and DiskSpace for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/sessions/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/sessions/tests.py b/django/contrib/sessions/tests.py
index 95e8e901a8..776e03c081 100644
--- a/django/contrib/sessions/tests.py
+++ b/django/contrib/sessions/tests.py
@@ -162,7 +162,10 @@ class SessionTestsMixin(object):
# removed the key) results in a new key being generated.
try:
session = self.backend('1')
- session.save()
+ try:
+ session.save()
+ except AttributeError:
+ self.fail("The session object did not save properly. Middleware may be saving cache items without namespaces.")
self.assertNotEqual(session.session_key, '1')
self.assertEqual(session.get('cat'), None)
session.delete()