[Zodb-checkins] CVS: ZODB3/BDBStorage/tests - test_whitebox.py:1.5
Barry Warsaw
barry@wooz.org
Mon, 27 Jan 2003 16:18:19 -0500
Update of /cvs-repository/ZODB3/BDBStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv22407
Modified Files:
test_whitebox.py
Log Message:
Backport storage version tests.
=== ZODB3/BDBStorage/tests/test_whitebox.py 1.4 => 1.5 ===
--- ZODB3/BDBStorage/tests/test_whitebox.py:1.4 Fri Jan 3 17:47:10 2003
+++ ZODB3/BDBStorage/tests/test_whitebox.py Mon Jan 27 16:18:16 2003
@@ -85,6 +85,14 @@
# stored object isn't referenced by any other objects.
eq(len(self._storage._refcounts.keys()), 0)
+ def checkStorageVersionAfterCreation(self):
+ from BDBStorage.BDBMinimalStorage import BDBMINIMAL_SCHEMA_VERSION
+ eq = self.assertEqual
+ eq(self._storage._info['version'], BDBMINIMAL_SCHEMA_VERSION)
+ self._storage.close()
+ self.open()
+ eq(self._storage._info['version'], BDBMINIMAL_SCHEMA_VERSION)
+
class WhiteboxHighLevelMinimal(ZODBTestBase):
@@ -174,6 +182,19 @@
+class WhiteboxLowLevelFull(BerkeleyTestBase):
+ ConcreteStorage = BDBFullStorage
+
+ def checkStorageVersionAfterCreation(self):
+ from BDBStorage.BDBFullStorage import BDBFULL_SCHEMA_VERSION
+ eq = self.assertEqual
+ eq(self._storage._info['version'], BDBFULL_SCHEMA_VERSION)
+ self._storage.close()
+ self.open()
+ eq(self._storage._info['version'], BDBFULL_SCHEMA_VERSION)
+
+
+
class WhiteboxHighLevelFull(ZODBTestBase):
ConcreteStorage = BDBFullStorage
@@ -229,6 +250,7 @@
if BDBStorage.is_available:
suite.addTest(unittest.makeSuite(WhiteboxLowLevelMinimal, 'check'))
suite.addTest(unittest.makeSuite(WhiteboxHighLevelMinimal, 'check'))
+ suite.addTest(unittest.makeSuite(WhiteboxLowLevelFull, 'check'))
suite.addTest(unittest.makeSuite(WhiteboxHighLevelFull, 'check'))
return suite