Skip to content

Commit

Permalink
[ADD] inhibit warnings from acl tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed May 18, 2016
1 parent aae74f0 commit ce12cab
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 ce12cab

Please sign in to comment.