From ce12cab6858e4b76fcb14d2342f133d4a3b98919 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 18 May 2016 11:29:52 +0200 Subject: [PATCH] [ADD] inhibit warnings from acl tests --- base_suspend_security/tests/test_base_suspend_security.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/base_suspend_security/tests/test_base_suspend_security.py b/base_suspend_security/tests/test_base_suspend_security.py index 7621c052a..24e2d889f 100644 --- a/base_suspend_security/tests/test_base_suspend_security.py +++ b/base_suspend_security/tests/test_base_suspend_security.py @@ -18,6 +18,7 @@ # ############################################################################## from openerp import exceptions +from openerp.tools import mute_logger from openerp.tests.common import TransactionCase @@ -34,9 +35,11 @@ class TestBaseSuspendSecurity(TransactionCase): }) # be sure what we try is forbidden with self.assertRaises(exceptions.AccessError): - self.env.ref('base.user_root').sudo(user_id).name = 'test' + with mute_logger('openerp.addons.base.ir.ir_model'): + self.env.ref('base.user_root').sudo(user_id).name = 'test' with self.assertRaises(exceptions.AccessError): - other_company.sudo(user_id).name = 'test' + with mute_logger('openerp.addons.base.ir.ir_model'): + other_company.sudo(user_id).name = 'test' # this tests ir.model.access self.env.ref('base.user_root').sudo(user_id).suspend_security().write({ 'name': 'test'})