[Checkins] SVN: zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/ add a test that would at least have triggered a deprecation warning;

Fred L. Drake, Jr. fdrake at gmail.com
Tue Oct 23 21:41:38 EDT 2007


Log message for revision 81006:
  add a test that would at least have triggered a deprecation warning;
  the zope.app.i18n.browser.synchronize module is not otherwise imported
  by the tests
  

Changed:
  U   zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/synchronize.py
  U   zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/tests/test_translate.py

-=-
Modified: zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/synchronize.py
===================================================================
--- zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/synchronize.py	2007-10-24 01:34:36 UTC (rev 81005)
+++ zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/synchronize.py	2007-10-24 01:41:37 UTC (rev 81006)
@@ -22,11 +22,14 @@
 import xmlrpclib
 from base64 import encodestring
 
+import zope.i18nmessageid
+
 from zope.security.proxy import removeSecurityProxy
 
 from zope.app.i18n.browser import BaseView
-from zope.app.i18n import ZopeMessageFactory as _
 
+_ = zope.i18nmessageid.MessageFactory("zope")
+
 DEFAULT = 'http://localhost:8080/++etc++site/default/zope'
 
 class Synchronize(BaseView):

Modified: zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/tests/test_translate.py
===================================================================
--- zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/tests/test_translate.py	2007-10-24 01:34:36 UTC (rev 81005)
+++ zope.app.i18n/branches/3.4/src/zope/app/i18n/browser/tests/test_translate.py	2007-10-24 01:41:37 UTC (rev 81006)
@@ -107,10 +107,21 @@
         self.assert_('es' not in self._view.getAllLanguages())
 
 
+class SynchronizeTest(unittest.TestCase):
 
+    def test_synchronize_imports(self):
+        # Trivial test that imports the module.  This would have triggered a
+        # deprecation warning in previous versions.
+        import zope.app.i18n.browser.synchronize
+
+
 def test_suite():
     loader = unittest.TestLoader()
-    return loader.loadTestsFromTestCase(TranslateTest)
+    return unittest.TestSuite([
+        loader.loadTestsFromTestCase(TranslateTest),
+        loader.loadTestsFromTestCase(SynchronizeTest),
+        ])
+    return 
 
 if __name__=='__main__':
     unittest.main()



More information about the Checkins mailing list