

def test_invalid_key(self):
    try:
        session = self.backend('1')
        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()
    finally:
        session.delete('1')

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/sessions/tests.py SessionTestsMixin.test_invalid_key/original