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