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 <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <[email protected]>
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()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.