Commit cd520c1f authored by Jim Fulton's avatar Jim Fulton

Changed some tests that used the old loadEx method to use load or the

loadEx helper function from VersionStorage, since loadEx isn't a
storage method.
parent e667b022
...@@ -22,6 +22,7 @@ from ZODB.serialize import referencesf ...@@ -22,6 +22,7 @@ from ZODB.serialize import referencesf
from ZODB.tests.MinPO import MinPO from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle from ZODB.tests.StorageTestBase import zodb_unpickle
from ZODB.tests.VersionStorage import loadEx
class TransactionalUndoVersionStorage: class TransactionalUndoVersionStorage:
...@@ -132,16 +133,15 @@ class TransactionalUndoVersionStorage: ...@@ -132,16 +133,15 @@ class TransactionalUndoVersionStorage:
self.assertEqual(load_value(oid1), 0) self.assertEqual(load_value(oid1), 0)
self.assertEqual(load_value(oid1, version), 2) self.assertEqual(load_value(oid1, version), 2)
data, tid, ver = self._storage.loadEx(oid1, "") data, tid = self._storage.load(oid1, "")
# After undoing the version commit, the non-version data # After undoing the version commit, the non-version data
# once again becomes the non-version data from 'create1'. # once again becomes the non-version data from 'create1'.
self.assertEqual(tid, self._storage.lastTransaction()) self.assertEqual(tid, self._storage.lastTransaction())
self.assertEqual(ver, "")
# The current version data comes from an undo record, which # The current version data comes from an undo record, which
# means that it gets data via the backpointer but tid from the # means that it gets data via the backpointer but tid from the
# current txn. # current txn.
data, tid, ver = self._storage.loadEx(oid1, version) data, tid, ver = loadEx(self._storage, oid1, version)
self.assertEqual(ver, version) self.assertEqual(ver, version)
self.assertEqual(tid, self._storage.lastTransaction()) self.assertEqual(tid, self._storage.lastTransaction())
......
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