Skip to content

Commit

Permalink
[TEST] mis_builder: prove non-admins cannot generate reports
Browse files Browse the repository at this point in the history
Normal users get `AccessError` when trying to preview or print reports.

Tests OCA#415.

@moduon MT-1527
  • Loading branch information
yajo authored and dzungtran89 committed Mar 14, 2023
1 parent 185d312 commit 8931ab2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mis_builder/tests/test_mis_report_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,3 +586,7 @@ def test_raise_when_unknown_kpi_value_type(self):
def test_raise_when_wrong_tuple_length_with_subkpis(self):
with self.assertRaises(SubKPITupleLengthError):
self.report_instance_3.compute()

def test_unprivileged(self):
test_user = common.new_test_user(self.env, "mis_you")
self.report_instance.with_user(test_user).compute()

0 comments on commit 8931ab2

Please sign in to comment.