[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup/tests - test_schema.py:1.6
Chris McDonough
chrism@zope.com
Tue, 8 Jul 2003 01:25:23 -0400
Update of /cvs-repository/Zope/lib/python/Zope/Startup/tests
In directory cvs.zope.org:/tmp/cvs-serv26876/lib/python/Zope/Startup/tests
Modified Files:
test_schema.py
Log Message:
Add a 'connection-class' key to the database definition which you may use to override the stock ZODB Connection class for a given database via the config file.
=== Zope/lib/python/Zope/Startup/tests/test_schema.py 1.5 => 1.6 ===
--- Zope/lib/python/Zope/Startup/tests/test_schema.py:1.5 Fri Mar 21 17:29:04 2003
+++ Zope/lib/python/Zope/Startup/tests/test_schema.py Tue Jul 8 01:25:19 2003
@@ -95,6 +95,23 @@
""")
self.assert_(isinstance(conf.dns_resolver, resolver.caching_resolver))
+ def test_zodb_db(self):
+ conf = self.load_config_text("""\
+ instancehome <<INSTANCE_HOME>>
+ <zodb_db main>
+ <filestorage>
+ path <<INSTANCE_HOME>>/var/Data.fs
+ </filestorage>
+ connection-class Products.TemporaryFolder.LowConflictConnection.LowConflictConnection
+ mount-point /
+ cache-size 5000
+ pool-size 7
+ version-pool-size 3
+ version-cache-size 100
+ </zodb_db>
+ """)
+ self.assertEqual(conf.databases[0].config.connection_class.__name__,
+ 'LowConflictConnection')
def test_suite():
return unittest.makeSuite(StartupTestCase)