Commit df2ebe37 authored by Jim Fulton's avatar Jim Fulton

Convert load calls to load_current

parent 3c5bbe7b
......@@ -91,8 +91,8 @@ class RecoveryStorage(IteratorDeepCompare):
# And check to see that the root object exists, but not the other
# objects.
data, serial = load_current(self._dst, root._p_oid)
raises(KeyError, self._dst.load, obj1._p_oid, '')
raises(KeyError, self._dst.load, obj2._p_oid, '')
raises(KeyError, load_current, self._dst, obj1._p_oid)
raises(KeyError, load_current, self._dst, obj2._p_oid)
def checkRestoreWithMultipleObjectsInUndoRedo(self):
from ZODB.FileStorage import FileStorage
......
......@@ -138,8 +138,7 @@ class TransactionalUndoStorage:
info = self._storage.undoInfo()
self._undo(info[4]["id"], [oid], note="undo3")
# This should fail since we've undone the object's creation
self.assertRaises(KeyError,
self._storage.load, oid, '')
self.assertRaises(KeyError, load_current, self._storage, oid)
# And now let's try to redo the object's creation
info = self._storage.undoInfo()
......@@ -178,7 +177,7 @@ class TransactionalUndoStorage:
# creation. Let's undo the object creation.
info = self._storage.undoInfo()
self._undo(info[2]['id'], [oid])
self.assertRaises(KeyError, self._storage.load, oid, '')
self.assertRaises(KeyError, load_current, self._storage, oid)
# Loading current data via loadBefore should raise a POSKeyError too:
self.assertRaises(KeyError, self._storage.loadBefore, oid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment