[Zope-Checkins] CVS: Zope3/lib/python/Zope/I18n/tests - testDirectives.py:1.4
Jim Fulton
jim@zope.com
Thu, 20 Jun 2002 11:55:39 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/I18n/tests
In directory cvs.zope.org:/tmp/cvs-serv15462/lib/python/Zope/I18n/tests
Modified Files:
testDirectives.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/I18n/tests/testDirectives.py 1.3 => 1.4 ===
"""
import unittest
-import sys
import os
from cStringIO import StringIO
-from Zope.Configuration.xmlconfig import xmlconfig, Context
+from Zope.Configuration.xmlconfig import xmlconfig, Context, XMLConfig
from Zope.Configuration.Exceptions import ConfigurationError
+
from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
-from Zope.I18n.GlobalTranslationService import translationService
import Zope.I18n
-defs_path = os.path.join(os.path.split(Zope.I18n.__file__)[0],
- 'meta.zcml')
+from Zope.I18n.GlobalTranslationService import translationService
template = """<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
@@ -43,8 +41,7 @@
def setUp(self):
PlacelessSetup.setUp(self)
- xmlconfig(open(defs_path))
-
+ XMLConfig('meta.zcml', Zope.I18n)()
def testRegisterTranslations(self):
eq = self.assertEqual