Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #16987 -- Improved error message for session tests. Thanks jMyl…

…es and DiskSpace for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1ac2bb9b8e299e82e64d77cd97028dc907342dd8 1 parent 749f072
@PaulMcMillan PaulMcMillan authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/contrib/sessions/tests.py
View
5 django/contrib/sessions/tests.py
@@ -162,7 +162,10 @@ def test_invalid_key(self):
# 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()
Please sign in to comment.
Something went wrong with that request. Please try again.