Changeset 50900
- Timestamp:
- 01/26/07 17:41:06 (3 years ago)
- Files:
-
- CPS3/products/CPSWorkflow/trunk/tests/test_workflow.py (modified) (1 diff)
- CPS3/products/CPSWorkflow/trunk/workflowtool.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
CPS3/products/CPSWorkflow/trunk/tests/test_workflow.py
r50898 r50900 213 213 self.assertEquals(wft.getCommentBehaviour('t1', dummy, context), 214 214 'Comment Behaviour') 215 self.assertEquals(wft.getCommentBehaviour('no such transition', 216 dummy, context), 217 None) 215 218 216 219 def test_suite(): CPS3/products/CPSWorkflow/trunk/workflowtool.py
r50898 r50900 885 885 886 886 def getCommentBehaviour(self, transition_id, proxy, context): 887 for wf_id in self.getChainFor(proxy): 887 wf_ids = self.getChainFor(proxy) 888 for wf_id in wf_ids: 888 889 wf = self.getWorkflowById(wf_id) 889 890 tdef = wf.transitions.get(transition_id, None) … … 891 892 break 892 893 else: 893 raise ValueError("Unknown transition: %s" % transition_id) 894 logger.info("getCommentBehaviour; no transition by id %s " 895 "in workflows %s", transition_id, wf_ids) 896 897 return None # no point having commment if there's no transition 894 898 895 899 return tdef.getCommentBehaviour(proxy, context)
