[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/tests - test_configure.py:1.2

Jim Fulton jim@zope.com
Mon, 28 Jul 2003 18:20:56 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/form/tests
In directory cvs.zope.org:/tmp/cvs-serv29869/src/zope/app/browser/form/tests

Modified Files:
	test_configure.py 
Log Message:
Changed to use new configuration api


=== Zope3/src/zope/app/browser/form/tests/test_configure.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_configure.py:1.1	Fri May 30 00:13:37 2003
+++ Zope3/src/zope/app/browser/form/tests/test_configure.py	Mon Jul 28 18:20:22 2003
@@ -17,31 +17,23 @@
 import unittest
 
 from zope.app.tests.placelesssetup import PlacelessSetup
-from zope.configuration.tests.test_xml import TempFile
-from zope.configuration.xmlconfig import XMLConfig
+from zope.configuration import xmlconfig
 
 
 class TestBrowserFormZCML(PlacelessSetup, unittest.TestCase):
 
     def test_load_zcml(self):
-        text = """\
-        <zopeConfigure xmlns='http://namespaces.zope.org/zope'>
-          <include package='zope.configuration' file='metameta.zcml' />
-          <include package='zope.app.component' file='meta.zcml' />
-          <include package='zope.app.event' file='meta.zcml' />
-          <include package='zope.app.publisher.browser' file='meta.zcml' />
-
-          <include package='zope.app.browser.form' />
-        </zopeConfigure>
-        """
-        f = TempFile()
-        try:
-            f.write(text)
-            f.flush()
-            x = XMLConfig(f.name)
-            x()
-        finally:
-            f.close()
+        # XXX Not much of a test.
+        xmlconfig.string(
+            """<configure xmlns='http://namespaces.zope.org/zope'>
+                 <include package='zope.app.component' file='meta.zcml' />
+                 <include package='zope.app.event' file='meta.zcml' />
+                 <include package='zope.app.publisher.browser'
+                          file='meta.zcml' />
+            
+                 <include package='zope.app.browser.form' />
+               </configure>"""
+            )
 
 
 def test_suite():