mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
749f0721c4
commit
1ac2bb9b8e
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue