You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
644 B

  1. # Copyright 2019 Onestein BV
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo.tests.common import TransactionCase
  4. class TestAccessRuleButtons(TransactionCase):
  5. def setUp(self):
  6. super(TestAccessRuleButtons, self).setUp()
  7. self.curr_obj = self.env['res.currency']
  8. self.curr_record = self.env.ref('base.USD')
  9. def test_check_access_rule_1(self):
  10. res = self.curr_obj.check_access_rule_all(['write'])
  11. self.assertTrue(res['write'])
  12. def test_check_access_rule_2(self):
  13. res = self.curr_record.check_access_rule_all(['write'])
  14. self.assertTrue(res['write'])