Commit 0a29d9c1 authored by Jérome Perrin's avatar Jérome Perrin

SecurityTestCase: better assertion failure for transition

The roles were missing
parent f2cd97eb
...@@ -225,12 +225,13 @@ class SecurityTestCase(ERP5TypeTestCase): ...@@ -225,12 +225,13 @@ class SecurityTestCase(ERP5TypeTestCase):
for wf_transition in wf._getWorkflowStateOf(document).getDestinationValueList(): for wf_transition in wf._getWorkflowStateOf(document).getDestinationValueList():
if wf_transition.getTriggerType() == TRIGGER_USER_ACTION: if wf_transition.getTriggerType() == TRIGGER_USER_ACTION:
workflow_transitions_description.append( workflow_transitions_description.append(
"%s%s[%s]\n\t\tExpression: %s\n\t\tPermissions: %s\n\t\tGroups: %s" % ( "%s%s[%s]\n\t\tExpression: %s\n\t\tPermissions: %s\n\t\tRoles: %s\n\t\tGroups: %s" % (
wf_transition.getReference() == transition and "* " or " ", wf_transition.getReference() == transition and "* " or " ",
wf_transition.getReference(), wf_transition.getReference(),
wf.getId(), wf.getId(),
wf_transition.getGuardExpression() or '', wf_transition.getGuardExpression() or '',
', '.join(wf_transition.getGuardPermissionList()), ', '.join(wf_transition.getGuardPermissionList()),
', '.join(wf_transition.getGuardRoleList()),
', '.join(wf_transition.getGuardGroupList()), ', '.join(wf_transition.getGuardGroupList()),
) )
) )
......
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