Commit 4163db4a authored by Jérome Perrin's avatar Jérome Perrin

Fix content translation test

Now title needs to be configured as a content translation translated property
to be able to search on title.
parent f4f74675
...@@ -45,12 +45,14 @@ class TestContentTranslation(ERP5TypeTestCase): ...@@ -45,12 +45,14 @@ class TestContentTranslation(ERP5TypeTestCase):
'erp5_content_translation', 'erp5_content_translation',
) )
def afterSetUp(self): def setUpOnce(self):
# set up translation domain on Person type information. # set up translation domain on Person type information.
from Products.ERP5Type.Accessor.Translation import TRANSLATION_DOMAIN_CONTENT_TRANSLATION from Products.ERP5Type.Accessor.Translation import TRANSLATION_DOMAIN_CONTENT_TRANSLATION
setTranslationDomain = self.portal.portal_types.Person.setTranslationDomain setTranslationDomain = self.portal.portal_types.Person.setTranslationDomain
setTranslationDomain('first_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION) setTranslationDomain('first_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
setTranslationDomain('last_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION) setTranslationDomain('last_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
setTranslationDomain('title', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
self.portal.portal_caches.manage_clearAllCache()
def testCatalogSearch(self): def testCatalogSearch(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