Commit 3b5dc2cf authored by Yusuke Muraoka's avatar Yusuke Muraoka

clean up a bit


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32259 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 28f54de4
...@@ -1148,53 +1148,60 @@ class TestWorkflow(SecurityTestCase): ...@@ -1148,53 +1148,60 @@ class TestWorkflow(SecurityTestCase):
self.assertEquals(sale_invoice.getSimulationState(), 'auto_planned') self.assertEquals(sale_invoice.getSimulationState(), 'auto_planned')
# other as anonymous # other as anonymous
self.failIfUserCanAccessDocument(self.other.getId(), sale_invoice) username = self.other.getReference()
self.failIfUserCanAddDocument(self.other.getId(), sale_invoice) self.failIfUserCanAccessDocument(username, sale_invoice)
self.failIfUserCanDeleteDocument(self.other.getId(), sale_invoice) self.failIfUserCanAddDocument(username, sale_invoice)
self.failIfUserCanModifyDocument(self.other.getId(), sale_invoice) self.failIfUserCanDeleteDocument(username, sale_invoice)
self.failIfUserCanViewDocument(self.other.getId(), sale_invoice) self.failIfUserCanModifyDocument(username, sale_invoice)
self.failIfUserCanViewDocument(username, sale_invoice)
# assignee # assignee
self.assertUserCanAccessDocument(self.assignee.getId(), sale_invoice) username = self.assignee.getReference()
self.assertUserCanAddDocument(self.assignee.getId(), sale_invoice) self.assertUserCanAccessDocument(username, sale_invoice)
self.assertUserCanDeleteDocument(self.assignee.getId(), sale_invoice) self.assertUserCanAddDocument(username, sale_invoice)
self.assertUserCanModifyDocument(self.assignee.getId(), sale_invoice) self.assertUserCanDeleteDocument(username, sale_invoice)
self.assertUserCanViewDocument(self.assignee.getId(), sale_invoice) self.assertUserCanModifyDocument(username, sale_invoice)
self.assertUserCanViewDocument(username, sale_invoice)
# assignor # assignor
self.assertUserCanAccessDocument(self.assignor.getId(), sale_invoice) username = self.assignor.getReference()
self.assertUserCanAddDocument(self.assignor.getId(), sale_invoice) self.assertUserCanAccessDocument(username, sale_invoice)
self.assertUserCanDeleteDocument(self.assignor.getId(), sale_invoice) self.assertUserCanAddDocument(username, sale_invoice)
self.assertUserCanModifyDocument(self.assignor.getId(), sale_invoice) self.assertUserCanDeleteDocument(username, sale_invoice)
self.assertUserCanViewDocument(self.assignor.getId(), sale_invoice) self.assertUserCanModifyDocument(username, sale_invoice)
self.assertUserCanViewDocument(username, sale_invoice)
# associate # associate
self.assertUserCanAccessDocument(self.associate.getId(), sale_invoice) username = self.associate.getReference()
self.assertUserCanAddDocument(self.associate.getId(), sale_invoice) self.assertUserCanAccessDocument(username, sale_invoice)
self.assertUserCanDeleteDocument(self.associate.getId(), sale_invoice) self.assertUserCanAddDocument(username, sale_invoice)
self.assertUserCanModifyDocument(self.associate.getId(), sale_invoice) self.assertUserCanDeleteDocument(username, sale_invoice)
self.assertUserCanViewDocument(self.associate.getId(), sale_invoice) self.assertUserCanModifyDocument(username, sale_invoice)
self.assertUserCanViewDocument(username, sale_invoice)
# auditor # auditor
self.assertUserCanAccessDocument(self.auditor.getId(), sale_invoice) username = self.auditor.getReference()
self.failIfUserCanAddDocument(self.auditor.getId(), sale_invoice) self.assertUserCanAccessDocument(username, sale_invoice)
self.failIfUserCanDeleteDocument(self.auditor.getId(), sale_invoice) self.failIfUserCanAddDocument(username, sale_invoice)
self.failIfUserCanModifyDocument(self.auditor.getId(), sale_invoice) self.failIfUserCanDeleteDocument(username, sale_invoice)
self.assertUserCanViewDocument(self.auditor.getId(), sale_invoice) self.failIfUserCanModifyDocument(username, sale_invoice)
self.assertUserCanViewDocument(username, sale_invoice)
# author # author
self.failIfUserCanAccessDocument(self.author.getId(), sale_invoice) username = self.author.getReference()
self.failIfUserCanAddDocument(self.author.getId(), sale_invoice) self.failIfUserCanAccessDocument(username, sale_invoice)
self.failIfUserCanDeleteDocument(self.author.getId(), sale_invoice) self.failIfUserCanAddDocument(username, sale_invoice)
self.failIfUserCanModifyDocument(self.author.getId(), sale_invoice) self.failIfUserCanDeleteDocument(username, sale_invoice)
self.failIfUserCanViewDocument(self.author.getId(), sale_invoice) self.failIfUserCanModifyDocument(username, sale_invoice)
self.failIfUserCanViewDocument(username, sale_invoice)
# manager # manager
self.assertUserCanAccessDocument(self.manager.getId(), sale_invoice) username = self.manager.getReference()
self.assertUserCanAddDocument(self.manager.getId(), sale_invoice) self.assertUserCanAccessDocument(username, sale_invoice)
self.assertUserCanDeleteDocument(self.manager.getId(), sale_invoice) self.assertUserCanAddDocument(username, sale_invoice)
self.assertUserCanModifyDocument(self.manager.getId(), sale_invoice) self.assertUserCanDeleteDocument(username, sale_invoice)
self.assertUserCanViewDocument(self.manager.getId(), sale_invoice) self.assertUserCanModifyDocument(username, sale_invoice)
self.assertUserCanViewDocument(username, sale_invoice)
self.assertSameSet(('confirm_action', 'plan_action',), self.assertSameSet(('confirm_action', 'plan_action',),
[action['id'] for action in self.portal.portal_workflow.getActionsFor(sale_invoice) [action['id'] for action in self.portal.portal_workflow.getActionsFor(sale_invoice)
......
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