Ejemplo n.º 1
0
    def test_accessed_setdefault(self):
        provideAdapter(testingSession)

        request = TestRequest()
        session = ISession(request)

        self.assertEquals(None, session.last_accessed)
        self.assertEquals(False, session.accessed())

        session.setdefault('foo', 'bar')

        self.failIf(session.last_accessed is None)
        self.assertEquals(True, session.accessed())