def test_sessionmanager_save(self):
        # Create a session
        self.session['y'] = 1
        self.session.save()

        s = Session.objects.get(session_key=self.session.session_key)
        # Change it
        Session.objects.save(s.session_key, {'y':2}, s.expire_date)
        # Clear cache, so that it will be retrieved from DB
        del self.session._session_cache
        self.assertEqual(self.session['y'], 2)
Test SessionManager.save method
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/contrib/sessions/tests.py/DatabaseSessionTests.test_sessionmanager_save