[FIX] base: mute handled errors

This commit is contained in:
Christophe Simonis
2017-07-26 20:28:32 +02:00
parent 46e1104ce1
commit 98d3a08ebb
+2 -2
View File
@@ -251,14 +251,14 @@ class TestCustomFields(common.TransactionCase):
def test_create_unique(self):
""" one cannot create two fields with the same name on a given model """
self.create_field('x_foo')
with self.assertRaises(IntegrityError):
with self.assertRaises(IntegrityError), mute_logger('odoo.sql_db'):
self.create_field('x_foo')
def test_rename_unique(self):
""" one cannot create two fields with the same name on a given model """
field1 = self.create_field('x_foo')
field2 = self.create_field('x_bar')
with self.assertRaises(IntegrityError):
with self.assertRaises(IntegrityError), mute_logger('odoo.sql_db'):
field2.name = field1.name
def test_remove_without_view(self):