[Erp5-report] r20954 - /erp5/trunk/products/CMFActivity/tests/testCMFActivity.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 14 11:55:26 CEST 2008


Author: vincent
Date: Wed May 14 11:55:25 2008
New Revision: 20954

URL: http://svn.erp5.org?rev=20954&view=rev
Log:
Add a check for Message-based translation.

Modified:
    erp5/trunk/products/CMFActivity/tests/testCMFActivity.py

Modified: erp5/trunk/products/CMFActivity/tests/testCMFActivity.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/tests/testCMFActivity.py?rev=20954&r1=20953&r2=20954&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/tests/testCMFActivity.py (original)
+++ erp5/trunk/products/CMFActivity/tests/testCMFActivity.py Wed May 14 11:55:25 2008
@@ -2919,7 +2919,9 @@
     TO_STRING = 'Bar'
     LANGUAGE = 'xx'
     def translationTest(context):
+      from Products.ERP5Type.Message import Message
       context.setTitle(context.Base_translateString(FROM_STRING))
+      context.setDescription(str(Message('erp5_ui', FROM_STRING)))
     portal = self.getPortalObject()
     portal.Localizer.erp5_ui.manage_addLanguage(LANGUAGE)
     # Add FROM_STRING to the message catalog
@@ -2945,6 +2947,7 @@
     finally:
       delattr(Organisation, 'translationTest')
     self.assertEqual(TO_STRING, organisation.getTitle())
+    self.assertEqual(TO_STRING, organisation.getDescription())
 
   def test_112_checkLocalizerWorksSQLQueue(self, quiet=0, run=run_all_test):
     if not run: return




More information about the Erp5-report mailing list