Skip to content

Commit

Permalink
Fixed #16987 -- Improved error message for session tests. Thanks jMyl…
Browse files Browse the repository at this point in the history
…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
PaulMcMillan committed Oct 5, 2011
1 parent 749f072 commit 1ac2bb9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django/contrib/sessions/tests.py
Expand Up @@ -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()
Expand Down

0 comments on commit 1ac2bb9

Please sign in to comment.