Commit da801da3 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test Query local roles

parent b4f78dde
......@@ -1892,3 +1892,25 @@ class TestPDF(TestSlapOSGroupRoleSecurityMixin):
self.assertRoles(delivery, 'F-ACCMAN', ['Assignor'])
self.assertRoles(delivery, 'F-ACCAGT', ['Assignee'])
class TestQuery(TestSlapOSGroupRoleSecurityMixin):
def test_Query_default(self):
delivery = self.portal.query_module.newContent(
portal_type='Query'
)
self.assertSecurityGroup(delivery,
[self.user_id], False)
self.assertRoles(delivery, self.user_id, ['Owner'])
def test_Query_agent(self):
# There is no interaction workflow to recalculate local roles
person = self.portal.person_module.newContent(portal_type='Person')
delivery = self.portal.query_module.newContent(
agent_value=person,
portal_type='Query'
)
self.assertSecurityGroup(delivery,
[self.user_id], False)
self.assertRoles(delivery, self.user_id, ['Owner'])
self.assertRoles(delivery, person.getUserId(), [])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment