Skip to content

Commit

Permalink
Merge pull request #427 from hbrunn/8.0-base_suspend_security-mute_lo…
Browse files Browse the repository at this point in the history
…gger

[ADD] inhibit warnings from acl tests
  • Loading branch information
pedrobaeza authored Aug 5, 2016
2 parents ebbc2eb + ce12cab commit b717070
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions base_suspend_security/tests/test_base_suspend_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
##############################################################################
from openerp import exceptions
from openerp.tools import mute_logger
from openerp.tests.common import TransactionCase


Expand All @@ -34,9 +35,11 @@ def test_base_suspend_security(self):
})
# 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'})
Expand Down

0 comments on commit b717070

Please sign in to comment.