Commit 1889b00e authored by Yusuke Muraoka's avatar Yusuke Muraoka

add a failing test for the bug #1790.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35382 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5520312a
......@@ -149,6 +149,9 @@ class TestContentTranslation(ERP5TypeTestCase):
self.assert_(getattr(person, 'getEnTranslatedFirstName', False))
self.assert_(getattr(person, 'getEnTranslatedFirstName', False))
##
# Add custom local.language
##
portal.Localizer._add_user_defined_language('Japanese Kana', 'ja-kana')
portal.Localizer.add_language('ja-kana')
transaction.commit()
......@@ -156,6 +159,9 @@ class TestContentTranslation(ERP5TypeTestCase):
self.assert_(getattr(person, 'setJaKanaTranslatedFirstName', False))
self.assert_(getattr(person, 'getJaKanaTranslatedFirstName', False))
self.assert_(getattr(person, 'hasJaKanaTranslatedFirstName', False))
self.assert_(not person.hasJaKanaTranslatedFirstName())
# if there is no translation, original value is returned.
self.assertEqual('Yusei', person.getTranslatedFirstName())
......@@ -169,6 +175,8 @@ class TestContentTranslation(ERP5TypeTestCase):
person.setJaKanaTranslatedFirstName('タハラ')
person.setJaKanaTranslatedLastName('ユウセイ')
self.assert_(person.hasJaKanaTranslatedFirstName())
transaction.commit()
self.tic()
......
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