Commit 133118fc authored by Eteri's avatar Eteri

erp5_core_test: extend test to cover Workflow Transition Variable

parent fcae4da8
Pipeline #25346 failed with stage
in 0 seconds
......@@ -131,6 +131,22 @@ class TestERP5Workflow(ERP5TypeTestCase):
history = doc.workflow_history['wf']
self.assertEqual(len(history), 2)# create, transition1
transition_variable = transition1.newContent(
portal_type='Workflow Transition Variable',
causality_value=variable1,
variable_default_expression='string:Set by transition variable',
)
workflow._executeTransition(doc,transition1)
self.assertEqual(
workflow.getCurrentStatusDict(doc)['variable1'],
"Set by transition variable")
# Without an expression, the variable is set to None
transition_variable.setVariableDefaultExpression(None)
workflow._executeTransition(doc,transition1)
self.assertEqual(workflow.getCurrentStatusDict(doc)['variable1'], None)
def test_afterScript(self):
......
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