[IMP] base, test_access_rights: mute ir_rule logging on ACL tests

The tests are willfully triggering ACL failures, logging the
information is noisy and not useful.
This commit is contained in:
Xavier Morel
2020-01-21 06:56:15 +00:00
parent 11f2dde662
commit 7b13ce17c2
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class TestORM(TransactionCase):
with self.assertRaises(MissingError):
p1.write({'name': 'foo'})
@mute_logger('odoo.models')
@mute_logger('odoo.models', 'odoo.addons.base.models.ir_rule')
def test_access_filtered_records(self):
""" Verify that accessing filtered records works as expected for non-admin user """
p1 = self.env['res.partner'].create({'name': 'W'})
@@ -3,6 +3,8 @@
from odoo.exceptions import AccessError
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger
class TestRules(TransactionCase):
def setUp(self):
@@ -28,6 +30,7 @@ class TestRules(TransactionCase):
'domain_force': "[('categ_id', 'in', user.env['test_access_right.obj_categ'].search([]).ids)]"
})
@mute_logger('odoo.addons.base.models.ir_rule')
def test_basic_access(self):
env = self.env(user=self.browse_ref('base.public_user'))
@@ -44,6 +47,7 @@ class TestRules(TransactionCase):
with self.assertRaises(AccessError):
self.assertEqual(browse2.val, -1)
@mute_logger('odoo.addons.base.models.ir_rule')
def test_group_rule(self):
env = self.env(user=self.browse_ref('base.public_user'))