[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI/tests - testServiceProvideClass.py:1.4

Jim Fulton jim@zope.com
Thu, 20 Jun 2002 11:55:36 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI/tests
In directory cvs.zope.org:/tmp/cvs-serv15462/lib/python/Zope/App/ZMI/tests

Modified Files:
	testServiceProvideClass.py 
Log Message:
implemented:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/MergeSecurityIntoZopeNamespace

While I was at it, I couldn't resist implementing a variation of:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SecurityPackageReorg

which was a lot more work. 



=== Zope3/lib/python/Zope/App/ZMI/tests/testServiceProvideClass.py 1.3 => 1.4 ===
 
 import unittest, sys, Interface, os
-from Zope.App.ZMI import provideClass
 
 from StringIO import StringIO
-from Zope.Configuration.xmlconfig import xmlconfig
+
+from Zope.ComponentArchitecture import getService
+
+from Zope.Configuration.xmlconfig import xmlconfig, XMLConfig
+from Zope.Configuration.xmlconfig import ZopeXMLConfigurationError
+
 from Zope.App.OFS.Services.AddableService.tests.AddableSetup \
      import AddableSetup
-from Zope.Configuration.xmlconfig import ZopeXMLConfigurationError
-from Zope.ComponentArchitecture import getService
 
 import Zope.App.ZMI
-defs_path = os.path.join(
-    os.path.split(Zope.App.ZMI.__file__)[0],
-    'meta.zcml')
+from Zope.App.ZMI import provideClass
 
 
 class MyAddableService:
@@ -40,7 +40,7 @@
 
     def setUp(self):
         AddableSetup.setUp(self)
-        xmlconfig(open(defs_path))
+        XMLConfig('meta.zcml', Zope.App.ZMI)()
 
     def testServiceProvideClassDirective(self):
         serviceName = (