Commit a197365b authored by Aurel's avatar Aurel

default mapping of translation is not same with chameleon (Zope4)

parent 3f1dba4a
...@@ -96,6 +96,13 @@ if 1: # BBB ...@@ -96,6 +96,13 @@ if 1: # BBB
sm.registerUtility(ui_domain, ITranslationDomain, 'ui') sm.registerUtility(ui_domain, ITranslationDomain, 'ui')
del portal._save_ui_domain 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_OK = 200
HTTP_UNAUTHORIZED = 401 HTTP_UNAUTHORIZED = 401
HTTP_REDIRECT = 302 HTTP_REDIRECT = 302
...@@ -335,7 +342,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -335,7 +342,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
response = self.publish('%s/portal_templates' % response = self.publish('%s/portal_templates' %
self.portal_id, self.auth) self.portal_id, self.auth)
self.assertEqual(HTTP_OK, response.getStatus()) self.assertEqual(HTTP_OK, response.getStatus())
self.assertTrue(('Business Template', {}) self.assertTrue(('Business Template', EXPECTED_TRANSLATION_MAPPING)
in translation_service._translated['ui']) in translation_service._translated['ui'])
self.assertTrue( self.assertTrue(
('Add ${portal_type}', {'portal_type': 'Business Template'}) in ('Add ${portal_type}', {'portal_type': 'Business Template'}) in
...@@ -355,7 +362,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -355,7 +362,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
response = self.publish('%s/portal_templates' % response = self.publish('%s/portal_templates' %
self.portal_id, self.auth) self.portal_id, self.auth)
self.assertEqual(HTTP_OK, response.getStatus()) 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']) translation_service._translated['ui'])
def test_error_log(self): def test_error_log(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment