def testPrincipalLastTransactionIsUndo(self): request = self.request bonobo = principalRegistry.getPrincipal('bonobo') request.setPrincipal(bonobo) view = UndoView(self.folder1, request) self.failIf(view.principalLastTransactionIsUndo()) # now undo the last transaction self.undo._emulatePublication(request) self.undo.undoTransactions(['6']) self.assert_(view.principalLastTransactionIsUndo())