diff --git a/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py b/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py index d81dc0de60a29a59111d79ad24510726f541b3d4..9ccdd28933f644a4dda22c1568f91664412dddee 100644 --- a/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py +++ b/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py @@ -96,6 +96,13 @@ if 1: # BBB sm.registerUtility(ui_domain, ITranslationDomain, 'ui') del portal._save_ui_domain +try: + import chameleon + EXPECTED_TRANSLATION_MAPPING = None +except ImportError: + # BBB in zope2 talinterpreter is setting mapping to {} + EXPECTED_TRANSLATION_MAPPING = {} + HTTP_OK = 200 HTTP_UNAUTHORIZED = 401 HTTP_REDIRECT = 302 @@ -335,7 +342,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): response = self.publish('%s/portal_templates' % self.portal_id, self.auth) self.assertEqual(HTTP_OK, response.getStatus()) - self.assertTrue(('Business Template', {}) + self.assertTrue(('Business Template', EXPECTED_TRANSLATION_MAPPING) in translation_service._translated['ui']) self.assertTrue( ('Add ${portal_type}', {'portal_type': 'Business Template'}) in @@ -355,7 +362,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): response = self.publish('%s/portal_templates' % self.portal_id, self.auth) self.assertEqual(HTTP_OK, response.getStatus()) - self.assertTrue(('Dummy Jump Action', {}) in + self.assertTrue(('Dummy Jump Action', EXPECTED_TRANSLATION_MAPPING) in translation_service._translated['ui']) def test_error_log(self):