[Zope3-checkins] CVS: ZODB4/ZODB/tests - testStorageConfig.py:1.4

Barry Warsaw barry@wooz.org
Wed, 4 Dec 2002 16:19:37 -0500


Update of /cvs-repository/ZODB4/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv10095

Modified Files:
	testStorageConfig.py 
Log Message:
Update to new BDBStorage naming conventions


=== ZODB4/ZODB/tests/testStorageConfig.py 1.3 => 1.4 ===
--- ZODB4/ZODB/tests/testStorageConfig.py:1.3	Sat Nov 23 03:14:04 2002
+++ ZODB4/ZODB/tests/testStorageConfig.py	Wed Dec  4 16:19:36 2002
@@ -107,12 +107,14 @@
 
     def testFullStorage(self):
         try:
-            from bsddb3Storage.Full import Full
+            from BDBStorage.BDBFullStorage import BDBFullStorage
         except ImportError:
+            import warnings
+            warnings.warn('No BDBStorage available', RuntimeWarning)
             return
         sample = """
         <Storage>
-        type       Full
+        type       BDBFullStorage
         name       %s
         cachesize  1000
         </Storage>
@@ -122,24 +124,26 @@
         rootconf = ZConfig.loadfile(io)
         storageconf = rootconf.getSection("Storage")
         cls, args = StorageConfig.getStorageInfo(storageconf)
-        self.assertEqual(cls, Full)
+        self.assertEqual(cls, BDBFullStorage)
         # It's too hard to test the config instance equality
         args = args.copy()
         del args['config']
         self.assertEqual(args, {"name": self.tmpfn})
         self.storage = StorageConfig.createStorage(storageconf)
-        self.assert_(isinstance(self.storage, Full))
+        self.assert_(isinstance(self.storage, BDBFullStorage))
         # XXX _config isn't public
         self.assert_(self.storage._config.cachesize, 1000)
 
     def testMinimalStorage(self):
         try:
-            from bsddb3Storage.Minimal import Minimal
+            from BDBStorage.BDBMinimalStorage import BDBMinimalStorage
         except ImportError:
+            import warnings
+            warnings.warn('No BDBStorage available', RuntimeWarning)
             return
         sample = """
         <Storage>
-        type       Minimal
+        type       BDBMinimalStorage
         name       %s
         cachesize  1000
         </Storage>
@@ -149,13 +153,13 @@
         rootconf = ZConfig.loadfile(io)
         storageconf = rootconf.getSection("Storage")
         cls, args = StorageConfig.getStorageInfo(storageconf)
-        self.assertEqual(cls, Minimal)
+        self.assertEqual(cls, BDBMinimalStorage)
         # It's too hard to test the config instance equality
         args = args.copy()
         del args['config']
         self.assertEqual(args, {"name": self.tmpfn})
         self.storage = StorageConfig.createStorage(storageconf)
-        self.assert_(isinstance(self.storage, Minimal))
+        self.assert_(isinstance(self.storage, BDBMinimalStorage))
         # XXX _config isn't public
         self.assert_(self.storage._config.cachesize, 1000)