Skip to content
Browse files

adapt test

Remove translation as was only checking that the translations are
correctly loaded anyway
  • Loading branch information...
mart-e committed Nov 8, 2019
1 parent c63163c commit 24885e817627d913e4facf4ca882b3889fc84110
Showing with 2 additions and 6 deletions.
  1. +2 −1 odoo/addons/base/tests/
  2. +0 −5 odoo/addons/test_new_api/tests/
@@ -673,11 +673,12 @@ def test_lp1071710(self):
""" Check that we can exclude translated fields (bug lp:1071710) """
# first install french language
self.env['res.partner'].search([('name', '=', 'Pepper Street')]).country_id = self.env.ref('')
# actual test
Country = self.env[''].with_context(lang='fr_FR')
be = self.env.ref('')
be.with_context(lang='fr_FR').name = "Belgique"
self.assertNotEqual(, "Belgique", "Setting a translation should not impact other languages")
not_be = self._search(Country, [('name', '!=', 'Belgique')])
self.assertNotIn(be, not_be)

@@ -27,11 +27,6 @@ class TestUiTranslation(odoo.tests.HttpCase):
@mute_logger('odoo.sql_db', 'odoo.http')
def test_01_sql_constraints(self):
# Raise an SQL constraint and test the message
constraint = self.env.ref('test_new_api.constraint_test_new_api_category_positive_color')
message = constraint.with_context(lang='fr_FR').message
self.assertEqual(message, "La couleur doit être une valeur positive !")

# TODO: make the test work with French translations. As the transaction
# is rollbacked at insert and a new cursor is opened, can not test that

0 comments on commit 24885e8

Please sign in to comment.
You can’t perform that action at this time.