[Zope3-checkins] CVS: Zope3/src/zope/app/schema/tests - test_vocabulary.py:1.3

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


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

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


=== Zope3/src/zope/app/schema/tests/test_vocabulary.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/schema/tests/test_vocabulary.py:1.2	Tue May 20 12:10:29 2003
+++ Zope3/src/zope/app/schema/tests/test_vocabulary.py	Mon Jul 28 18:20:34 2003
@@ -18,8 +18,7 @@
 
 from zope.app.schema import vocabulary
 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 MyContext:
@@ -46,9 +45,8 @@
         self.assertEqual(vocab.kw, kw)
 
     def load_zcml(self, fragment):
-        text = """\
+        xmlconfig.string("""\
         <zopeConfigure xmlns='http://namespaces.zope.org/zope'>
-          <include package='zope.configuration' file='metameta.zcml' />
           <include package='zope.configuration' file='meta.zcml' />
           <include package='zope.app.component' file='meta.zcml' />
           <include package='zope.app.schema' file='meta.zcml' />
@@ -57,15 +55,7 @@
 
           %s
         </zopeConfigure>
-        """ % fragment
-        f = TempFile()
-        try:
-            f.write(text)
-            f.flush()
-            x = XMLConfig(f.name)
-            x()
-        finally:
-            f.close()
+        """ % fragment)
 
     extra_keywords = {"filter": "my-filter",
                       "another": "keyword"}