Ticket #16987: better_invalid_session_key_testfail

File better_invalid_session_key_testfail, 674 bytes (added by jMyles, 13 years ago)

Patch developed at DiscSpace - this patch would have saved half a day's work.

Line 
1Index: tests.py
2===================================================================
3--- tests.py (revision 16772)
4+++ tests.py (working copy)
5@@ -162,7 +162,10 @@
6 # removed the key) results in a new key being generated.
7 try:
8 session = self.backend('1')
9- session.save()
10+ try:
11+ session.save()
12+ except AttributeError:
13+ self.fail("The session object did not save properly. Middleware may be saving cache items without namespaces.")
14 self.assertNotEqual(session.session_key, '1')
15 self.assertEqual(session.get('cat'), None)
16 session.delete()
17
Back to Top