[Zope3-checkins] CVS: Zope3/src/zope/app/i18n/tests - testi18ndirectives.py:1.1.2.2

Fred L. Drake, Jr. fred@zope.com
Tue, 24 Dec 2002 02:44:37 -0500


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

Modified Files:
      Tag: NameGeddon-branch
	testi18ndirectives.py 
Log Message:
- fix up import
- normalize whitespace


=== Zope3/src/zope/app/i18n/tests/testi18ndirectives.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/i18n/tests/testi18ndirectives.py:1.1.2.1	Mon Dec 23 14:31:37 2002
+++ Zope3/src/zope/app/i18n/tests/testi18ndirectives.py	Tue Dec 24 02:44:36 2002
@@ -15,19 +15,21 @@
 
 $Id$
 """
-import unittest
 import os
+import unittest
+
 from cStringIO import StringIO
 
+from zope.component.tests.placelesssetup import PlacelessSetup
 from zope.configuration.xmlconfig import xmlconfig, Context, XMLConfig
 from zope.configuration.exceptions import ConfigurationError
 
-from zope.component.tests.placelesssetup import PlacelessSetup
+import zope.app.i18n
+import zope.i18n.tests
 
-import Zope.App.i18n
-import Zope.I18n.tests
 from zope.i18n.globaltranslationservice import translationService 
 
+
 template = """<zopeConfigure
    xmlns='http://namespaces.zope.org/zope'
    xmlns:gts='http://namespaces.zope.org/gts'>
@@ -42,7 +44,7 @@
 
     def setUp(self):
         PlacelessSetup.setUp(self)
-        XMLConfig('meta.zcml', Zope.App.i18n)()
+        XMLConfig('meta.zcml', zope.app.i18n)()
 
     def testRegisterTranslations(self):
         eq = self.assertEqual
@@ -51,8 +53,8 @@
             '''
             <gts:registerTranslations directory="./locale" />
             '''
-            )), None, Context([], Zope.I18n.tests)) 
-        path = os.path.join(Context([], Zope.I18n.tests).path(),
+            )), None, Context([], zope.i18n.tests)) 
+        path = os.path.join(Context([], zope.i18n.tests).path(),
                             'locale', 'en',
                             'LC_MESSAGES', 'Zope-I18n.mo')
         eq(translationService._catalogs,
@@ -65,14 +67,12 @@
             '''
             <gts:defaultLanguages languages="de nl xx" />
             '''
-            )), None, Context([], Zope.I18n.tests))
+            )), None, Context([], zope.i18n.tests))
         eq(translationService._fallbacks, ['de', 'nl', 'xx'])
 
 
 def test_suite():
-    loader=unittest.TestLoader()
-    return loader.loadTestsFromTestCase(DirectivesTest)
+    return unittest.makeSuite(DirectivesTest)
 
-if __name__=='__main__':
+if __name__ == '__main__':
     unittest.TextTestRunner().run(test_suite())
-