Commit d7c8e089 authored by iv's avatar iv

ERP5Workflow: fix incorrect Workflist variable creation in testWorklist

parent ae19b4cc
...@@ -143,12 +143,12 @@ class TestWorklist(testWorkflowMixin): ...@@ -143,12 +143,12 @@ class TestWorklist(testWorkflowMixin):
expression=guard_expr expression=guard_expr
) )
for _, value in kw.iteritems(): for worklist_variable_key, worklist_variable_value in kw.iteritems():
if isinstance(value, str) and value.startswith('python'): worklist_variable = worklist_value.newContent(portal_type='Worklist Variable',
# XXX(WORKFLOW), default expr does not follow naming conventions initial_value=worklist_variable_value,
worklist_value.newContent(portal_type='Worklist Variable', default_expr=value) reference=worklist_variable_key)
else: if isinstance(worklist_variable_value, str) and worklist_variable_value.startswith('python'):
worklist_value.newContent(portal_type='Worklist Variable', intial_value=value) worklist_variable.setDefaultExpression(worklist_variable_value)
def createDCWorklist(self, workflow_value, worklist_id, actbox_name, def createDCWorklist(self, workflow_value, worklist_id, actbox_name,
actbox_url=None, **kw): actbox_url=None, **kw):
...@@ -269,6 +269,7 @@ class TestWorklist(testWorkflowMixin): ...@@ -269,6 +269,7 @@ class TestWorklist(testWorkflowMixin):
result = workflow_tool.listActions(object=document) result = workflow_tool.listActions(object=document)
self.logMessage("Check %s worklist with int value as %s" % \ self.logMessage("Check %s worklist with int value as %s" % \
(user_id, 2)) (user_id, 2))
self.checkWorklist(result, 'int_value_todo', 0) self.checkWorklist(result, 'int_value_todo', 0)
# #
......
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