[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests - test_globaltranslationservice.py:1.12

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Aug 6 11:36:17 EDT 2003


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

Modified Files:
	test_globaltranslationservice.py 
Log Message:
If we have an empty message id, just return an empty string; do not worry
about going through the entire machinery.


=== Zope3/src/zope/i18n/tests/test_globaltranslationservice.py 1.11 => 1.12 ===
--- Zope3/src/zope/i18n/tests/test_globaltranslationservice.py:1.11	Thu May  1 15:35:43 2003
+++ Zope3/src/zope/i18n/tests/test_globaltranslationservice.py	Wed Aug  6 10:36:12 2003
@@ -74,6 +74,10 @@
                      default='short_greeting'),
            'short_greeting')
 
+    def testEmptyStringTranslate(self):
+        translate = self._service.translate
+        self.assertEqual(translate(u'', 'default', target_language='en'), u'')
+        self.assertEqual(translate(u'', 'blah', target_language='foo'), u'')
 
     def testStringTranslate(self):
         translate = self._service.translate




More information about the Zope3-Checkins mailing list