[Zodb-checkins] SVN: ZODB/branches/jim-thready/src/ZODB/tests/TransactionalUndoStorage.py Updated to reflect undo api change. undo may not return data any more

Jim Fulton jim at zope.com
Fri Jan 22 17:30:50 EST 2010


Log message for revision 108401:
  Updated to reflect undo api change. undo may not return data any more
  (and doesn't for ClientStorage).
  

Changed:
  U   ZODB/branches/jim-thready/src/ZODB/tests/TransactionalUndoStorage.py

-=-
Modified: ZODB/branches/jim-thready/src/ZODB/tests/TransactionalUndoStorage.py
===================================================================
--- ZODB/branches/jim-thready/src/ZODB/tests/TransactionalUndoStorage.py	2010-01-22 22:30:47 UTC (rev 108400)
+++ ZODB/branches/jim-thready/src/ZODB/tests/TransactionalUndoStorage.py	2010-01-22 22:30:50 UTC (rev 108401)
@@ -369,6 +369,10 @@
         self._iterate()
 
 
+    def __undo_and_vote(self, tid, t):
+        self._storage.undo(tid, t)
+        self._storage.tpc_vote(t)
+
     def checkNotUndoable(self):
         eq = self.assertEqual
         # Set things up so we've got a transaction that can't be undone
@@ -381,9 +385,7 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        self.assertRaises(POSException.UndoError,
-                          self._storage.undo,
-                          tid, t)
+        self.assertRaises(POSException.UndoError, self.__undo_and_vote, tid, t)
         self._storage.tpc_abort(t)
         # Now have more fun: object1 and object2 are in the same transaction,
         # which we'll try to undo to, but one of them has since modified in
@@ -420,9 +422,7 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        self.assertRaises(POSException.UndoError,
-                          self._storage.undo,
-                          tid, t)
+        self.assertRaises(POSException.UndoError, self.__undo_and_vote, tid, t)
         self._storage.tpc_abort(t)
         self._iterate()
 



More information about the Zodb-checkins mailing list