Browse Source

Merge pull request #427 from hbrunn/8.0-base_suspend_security-mute_logger

[ADD] inhibit warnings from acl tests
pull/507/head
Pedro M. Baeza 8 years ago
committed by GitHub
parent
commit
b717070089
  1. 3
      base_suspend_security/tests/test_base_suspend_security.py

3
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,8 +35,10 @@ class TestBaseSuspendSecurity(TransactionCase):
})
# be sure what we try is forbidden
with self.assertRaises(exceptions.AccessError):
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):
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({

Loading…
Cancel
Save