Commit 9f6787d8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

update translation when we install business templates in unit tests.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25474 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7025dfd3
...@@ -1040,6 +1040,19 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -1040,6 +1040,19 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEqual(org._getTypeBasedMethod('dummyFooMethod'), None) self.assertEqual(org._getTypeBasedMethod('dummyFooMethod'), None)
self.assertEqual(org._getTypeBasedMethod('dummyFoo2Method'), None) self.assertEqual(org._getTypeBasedMethod('dummyFoo2Method'), None)
def test_translate_table(self):
"""check if Person portal type that is installed in erp5_base is
well indexed in translate table or not.
"""
self.getPortal().person_module.newContent(portal_type='Person',
title='translate_table_test')
get_transaction().commit()
self.tic()
self.assertEquals(1, len(self.getPortal().portal_catalog(
portal_type='Person', title='translate_table_test')))
self.assertEquals(1, len(self.getPortal().portal_catalog(
translated_portal_type='Person', title='translate_table_test')))
class TestERP5PropertyManager(unittest.TestCase): class TestERP5PropertyManager(unittest.TestCase):
"""Tests for ERP5PropertyManager. """Tests for ERP5PropertyManager.
""" """
......
...@@ -722,7 +722,9 @@ class ERP5TypeTestCase(PortalTestCase): ...@@ -722,7 +722,9 @@ class ERP5TypeTestCase(PortalTestCase):
listbox_object_list = BusinessTemplate_getModifiedObject.__of__(bt)() listbox_object_list = BusinessTemplate_getModifiedObject.__of__(bt)()
for listbox_line in listbox_object_list: for listbox_line in listbox_object_list:
install_kw[listbox_line.object_id] = listbox_line.choice_item_list[0][1] install_kw[listbox_line.object_id] = listbox_line.choice_item_list[0][1]
bt.install(light_install=light_install, object_to_update=install_kw) bt.install(light_install=light_install,
object_to_update=install_kw,
update_translation=1)
# Release locks # Release locks
get_transaction().commit() get_transaction().commit()
if not quiet: if not quiet:
......
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