[Zope3-checkins] CVS: Zope3/src/zodb/storage/tests - test_config.py:1.1.2.2
Barry Warsaw
barry@wooz.org
Mon, 23 Dec 2002 17:01:08 -0500
Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv16134
Modified Files:
Tag: NameGeddon-branch
test_config.py
Log Message:
zwim downztream
=== Zope3/src/zodb/storage/tests/test_config.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_config.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_config.py Mon Dec 23 17:01:07 2002
@@ -6,7 +6,7 @@
import ZConfig
-from zodb import StorageConfig
+from zodb import config
class StorageTestCase(unittest.TestCase):
@@ -45,10 +45,10 @@
io = StringIO(sample)
rootconf = ZConfig.loadfile(io)
storageconf = rootconf.getSection("Storage")
- cls, args = StorageConfig.getStorageInfo(storageconf)
+ cls, args = config.getStorageInfo(storageconf)
self.assertEqual(cls, FileStorage)
self.assertEqual(args, {"file_name": self.tmpfn, "create": 1})
- self.storage = StorageConfig.createStorage(storageconf)
+ self.storage = config.createStorage(storageconf)
self.assert_(isinstance(self.storage, FileStorage))
def testZEOStorage(self):
@@ -66,10 +66,10 @@
io = StringIO(sample)
rootconf = ZConfig.loadfile(io)
storageconf = rootconf.getSection("Storage")
- cls, args = StorageConfig.getStorageInfo(storageconf)
+ cls, args = config.getStorageInfo(storageconf)
self.assertEqual(cls, ClientStorage)
self.assertEqual(args, {"addr": [("www.python.org", 9001)], "wait": 0})
- self.storage = StorageConfig.createStorage(storageconf)
+ self.storage = config.createStorage(storageconf)
self.assert_(isinstance(self.storage, ClientStorage))
def testMappingStorage(self):
@@ -82,10 +82,10 @@
io = StringIO(sample)
rootconf = ZConfig.loadfile(io)
storageconf = rootconf.getSection("Storage")
- cls, args = StorageConfig.getStorageInfo(storageconf)
+ cls, args = config.getStorageInfo(storageconf)
self.assertEqual(cls, MappingStorage)
self.assertEqual(args, {})
- self.storage = StorageConfig.createStorage(storageconf)
+ self.storage = config.createStorage(storageconf)
self.assert_(isinstance(self.storage, MappingStorage))
def testModuleStorage(self):
@@ -99,10 +99,10 @@
io = StringIO(sample)
rootconf = ZConfig.loadfile(io)
storageconf = rootconf.getSection("Storage")
- cls, args = StorageConfig.getStorageInfo(storageconf)
+ cls, args = config.getStorageInfo(storageconf)
self.assertEqual(cls, MappingStorage)
self.assertEqual(args, {})
- self.storage = StorageConfig.createStorage(storageconf)
+ self.storage = config.createStorage(storageconf)
self.assert_(isinstance(self.storage, MappingStorage))
def testFullStorage(self):
@@ -123,13 +123,13 @@
io = StringIO(sample)
rootconf = ZConfig.loadfile(io)
storageconf = rootconf.getSection("Storage")
- cls, args = StorageConfig.getStorageInfo(storageconf)
+ cls, args = config.getStorageInfo(storageconf)
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.storage = config.createStorage(storageconf)
self.assert_(isinstance(self.storage, BDBFullStorage))
# XXX _config isn't public
self.assert_(self.storage._config.cachesize, 1000)
@@ -152,13 +152,13 @@
io = StringIO(sample)
rootconf = ZConfig.loadfile(io)
storageconf = rootconf.getSection("Storage")
- cls, args = StorageConfig.getStorageInfo(storageconf)
+ cls, args = config.getStorageInfo(storageconf)
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.storage = config.createStorage(storageconf)
self.assert_(isinstance(self.storage, BDBMinimalStorage))
# XXX _config isn't public
self.assert_(self.storage._config.cachesize, 1000)