[Zope-Checkins] CVS: Zope3/lib/python/Zope/Configuration/tests - testXML.py:1.3
Steve Alexander
steve@cat-box.net
Sun, 23 Jun 2002 12:20:22 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Configuration/tests
In directory cvs.zope.org:/tmp/cvs-serv932/lib/python/Zope/Configuration/tests
Modified Files:
testXML.py
Log Message:
fixed up zcml include if you don't specify a package, and the including
zcml file doesn't supply a package either, transitively repeated.
There's a test for this now too!
=== Zope3/lib/python/Zope/Configuration/tests/testXML.py 1.2 => 1.3 ===
from Zope.Configuration.xmlconfig import XMLConfig
- x=XMLConfig(name)
+ x = XMLConfig(name)
+ x()
+
+ def testIncludeNoPackageAndIncluderNoPackage(self):
+ from tempfile import mktemp
+ from os.path import split
+ full_name = mktemp()
+ full_name1 = mktemp()
+ name1 = split(full_name1)[-1]
+
+ open(full_name, 'w').write(
+ """<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
+ <include file="%s" />
+ </zopeConfigure>""" % name1)
+ open(full_name1, 'w').write(
+ """<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
+ <include package="Zope.Configuration.tests.Contact"
+ file="contact.zcml" />
+ </zopeConfigure>""")
+ from Zope.Configuration.xmlconfig import XMLConfig
+ x = XMLConfig(full_name)
x()