Commit e2f258ba authored by Florent Guillaume's avatar Florent Guillaume

Fix for the cases where test.py is run without a configuration file.

parent c80c7635
...@@ -61,12 +61,15 @@ def startup(): ...@@ -61,12 +61,15 @@ def startup():
m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2]) m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2])
sys.modules['Zope2.custom_zodb']=m sys.modules['Zope2.custom_zodb']=m
# Get the database and join it to the dbtab multidatabase
# FIXME: this uses internal datastructures of dbtab
databases = getattr(dbtab, 'databases', {})
if hasattr(m,'DB'): if hasattr(m,'DB'):
DB=m.DB DB=m.DB
dbtab.databases.update(getattr(DB, 'databases', {})) databases.update(getattr(DB, 'databases', {}))
DB.databases = dbtab.databases DB.databases = databases
else: else:
DB = ZODB.DB(m.Storage, databases=dbtab.databases) DB = ZODB.DB(m.Storage, databases=databases)
Globals.BobobaseName = DB.getName() Globals.BobobaseName = DB.getName()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment