summaryrefslogtreecommitdiff
path: root/odoo/addons/test_access_rights
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-06-11 16:34:29 +0200
committerChristophe Simonis <chs@odoo.com>2019-06-11 16:34:29 +0200
commit10fac59172aef902abf9ca4024cffb24bc03d965 (patch)
tree837add720f432c3dcb3d0722a5fd3404bc4048b2 /odoo/addons/test_access_rights
parent8853e6b594eb0387939741ec2a8b208593c29646 (diff)
[FIX] test_access_rights: adapt tests to new error message format
Oversight of previous forward-port.
Diffstat (limited to 'odoo/addons/test_access_rights')
-rw-r--r--odoo/addons/test_access_rights/tests/test_feedback.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/odoo/addons/test_access_rights/tests/test_feedback.py b/odoo/addons/test_access_rights/tests/test_feedback.py
index 660dd068199..d9ba8be24d2 100644
--- a/odoo/addons/test_access_rights/tests/test_feedback.py
+++ b/odoo/addons/test_access_rights/tests/test_feedback.py
@@ -57,15 +57,12 @@ class TestACLFeedback(Feedback):
})
self.assertEqual(
ctx.exception.args[0],
- """Sorry, you are not allowed to create documents of type 'Object For Test Access Right' (test_access_right.some_obj). This operation is allowed for the groups:
- - Group 0"""
+ """Sorry, you are not allowed to create documents of type 'Object For Test Access Right' (test_access_right.some_obj). This operation is allowed for the groups:\n\t- Group 0"""
)
def test_two_groups(self):
r = self.record.sudo(self.user)
- expected = """Sorry, you are not allowed to access documents of type 'Object For Test Access Right' (test_access_right.some_obj). This operation is allowed for the groups:
- - Group 0
- - Group 1"""
+ expected = """Sorry, you are not allowed to access documents of type 'Object For Test Access Right' (test_access_right.some_obj). This operation is allowed for the groups:\n\t- Group 0\n\t- Group 1"""
with self.assertRaises(AccessError) as ctx:
# noinspection PyStatementEffect
r.val
@@ -266,8 +263,10 @@ class TestFieldGroupFeedback(Feedback):
Document type: Object For Test Access Right (test_access_right.some_obj)
Operation: read
+User: %s
Fields:
- forbidden (allowed for groups 'User types / Internal User', 'Test Group'; forbidden for groups 'Extra Rights / Technical Features', 'User types / Public')"""
+ % self.user.id
)
def test_write(self):
@@ -283,7 +282,9 @@ Fields:
Document type: Object For Test Access Right (test_access_right.some_obj)
Operation: write
+User: %s
Fields:
- forbidden (allowed for groups 'User types / Internal User', 'Test Group'; forbidden for groups 'Extra Rights / Technical Features', 'User types / Public')
- forbidden2 (allowed for groups 'Test Group')"""
+ % self.user.id
)