[Zope3-checkins] CVS: Zope3/lib/python/ZODB/tests - testFileStorage.py:1.24

Jeremy Hylton jeremy@zope.com
Fri, 6 Dec 2002 15:29:12 -0500


Update of /cvs-repository/Zope3/lib/python/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv26447

Modified Files:
	testFileStorage.py 
Log Message:
Remove local defn of checkRecoverUndoInVersion().


=== Zope3/lib/python/ZODB/tests/testFileStorage.py 1.23 => 1.24 ===
--- Zope3/lib/python/ZODB/tests/testFileStorage.py:1.23	Wed Dec  4 16:57:09 2002
+++ Zope3/lib/python/ZODB/tests/testFileStorage.py	Fri Dec  6 15:29:11 2002
@@ -91,63 +91,6 @@
         StorageTestBase.removefs('Dest.fs')
         return ZODB.FileStorage.FileStorage('Dest.fs')
 
-    def checkRecoverUndoInVersion(self):
-        oid = self._storage.new_oid()
-        version = "aVersion"
-        revid_a = self._dostore(oid, data=MinPO(91))
-        revid_b = self._dostore(oid, revid=revid_a, version=version,
-                                data=MinPO(92))
-        revid_c = self._dostore(oid, revid=revid_b, version=version,
-                                data=MinPO(93))
-        self._undo(self._storage.undoInfo()[0]['id'], oid)
-        self._commitVersion(version, '')
-        self._undo(self._storage.undoInfo()[0]['id'], oid)
-
-        # now copy the records to a new storage
-        self._dst.copyTransactionsFrom(self._storage)
-        self.compare(self._storage, self._dst)
-
-        # The last two transactions were applied directly rather than
-        # copied.  So we can't use compare() to verify that they new
-        # transactions are applied correctly.  (The new transactions
-        # will have different timestamps for each storage.)
-
-        self._abortVersion(version)
-        self.assert_(self._storage.versionEmpty(version))
-        self._undo(self._storage.undoInfo()[0]['id'], oid)
-        self.assert_(not self._storage.versionEmpty(version))
-
-        # check the data is what we expect it to be
-        data, revid = self._storage.load(oid, version)
-        self.assertEqual(zodb_unpickle(data), MinPO(92))
-        data, revid = self._storage.load(oid, '')
-        self.assertEqual(zodb_unpickle(data), MinPO(91))
-
-        # and swap the storages
-        tmp = self._storage
-        self._storage = self._dst
-        self._abortVersion(version)
-        self.assert_(self._storage.versionEmpty(version))
-        self._undo(self._storage.undoInfo()[0]['id'], oid)
-        self.assert_(not self._storage.versionEmpty(version))
-
-        # check the data is what we expect it to be
-        data, revid = self._storage.load(oid, version)
-        self.assertEqual(zodb_unpickle(data), MinPO(92))
-        data, revid = self._storage.load(oid, '')
-        self.assertEqual(zodb_unpickle(data), MinPO(91))
-
-        # swap them back
-        self._storage = tmp
-
-        # Now remove _dst and copy all the transactions a second time.
-        # This time we will be able to confirm via compare().
-        self._dst.close()
-        StorageTestBase.removefs("Dest.fs")
-        self._dst = ZODB.FileStorage.FileStorage('Dest.fs')
-        self._dst.copyTransactionsFrom(self._storage)
-        self.compare(self._storage, self._dst)
-
 def test_suite():
     suite = unittest.makeSuite(FileStorageTests, 'check')
     suite2 = unittest.makeSuite(Corruption.FileStorageCorruptTests, 'check')