[Zope3-checkins]
SVN: Zope3/branches/jinty-zodbless/src/zope/app/appsetup/
Do not require the <zodb> section in zope.conf anymore.
Brian Sutherland
jinty at web.de
Mon Apr 9 12:31:03 EDT 2007
Log message for revision 74052:
Do not require the <zodb> section in zope.conf anymore.
Changed:
U Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema/schema.xml
A Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema.txt
U Zope3/branches/jinty-zodbless/src/zope/app/appsetup/tests.py
-=-
Modified: Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema/schema.xml
===================================================================
--- Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema/schema.xml 2007-04-09 16:08:16 UTC (rev 74051)
+++ Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema/schema.xml 2007-04-09 16:31:02 UTC (rev 74052)
@@ -54,7 +54,7 @@
</description>
</multisection>
- <multisection type="ZODB.database" name="*" required="yes"
+ <multisection type="ZODB.database" name="*" required="no"
attribute="databases">
<description>
Added: Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema.txt
===================================================================
--- Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema.txt 2007-04-09 16:08:16 UTC (rev 74051)
+++ Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema.txt 2007-04-09 16:31:02 UTC (rev 74052)
@@ -0,0 +1,36 @@
+Test the zope application ZConfig Schema
+========================================
+
+ >>> import os
+ >>> import doctest
+ >>> import ZConfig
+
+ >>> here = os.path.dirname(__file__)
+ >>> schemafile = os.path.join(here, "schema", "schema.xml")
+ >>> schema = ZConfig.loadSchema(schemafile)
+
+Try load a very minimal zope.conf:
+
+ >>> MINIMAL_ZOPE_CONF = """
+ ... <eventlog>
+ ... <logfile>
+ ... path event.log
+ ... </logfile>
+ ... </eventlog>
+ ... """
+
+Make a temporary file to hold the zope.conf:
+
+ >>> import tempfile
+ >>> _, conf = tempfile.mkstemp()
+ >>> f = open(conf, 'w')
+ >>> f.write(MINIMAL_ZOPE_CONF)
+ >>> f.close()
+
+Load it up:
+
+ >>> configroot, _ = ZConfig.loadConfig(schema, conf)
+
+Cleanup:
+
+ >>> os.remove(conf)
Property changes on: Zope3/branches/jinty-zodbless/src/zope/app/appsetup/schema.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: Zope3/branches/jinty-zodbless/src/zope/app/appsetup/tests.py
===================================================================
--- Zope3/branches/jinty-zodbless/src/zope/app/appsetup/tests.py 2007-04-09 16:08:16 UTC (rev 74051)
+++ Zope3/branches/jinty-zodbless/src/zope/app/appsetup/tests.py 2007-04-09 16:31:02 UTC (rev 74052)
@@ -163,6 +163,7 @@
suite.addTest(doctest.DocTestSuite(
'zope.app.appsetup.appsetup',
setUp=placelesssetup.setUp, tearDown=placelesssetup.tearDown))
+ suite.addTest(doctest.DocFileSuite('schema.txt'))
suite.addTest(doctest.DocFileSuite(
'bootstrap.txt',
setUp=placelesssetup.setUp, tearDown=placelesssetup.tearDown,
More information about the Zope3-Checkins
mailing list