same-behaviour changes after review from Julien

And another test to show behaviour of run-once interactions on temp objects
affecting real-objects.

And a global search/replace on assertEquals -> assertEqual on
testInteractionWorkflow.py
parent e4cb0458
...@@ -213,11 +213,10 @@ class WorkflowMethod(Method): ...@@ -213,11 +213,10 @@ class WorkflowMethod(Method):
for transition_id in transition_list: for transition_id in transition_list:
if candidate_workflow.isWorkflowMethodSupported(instance, transition_id): if candidate_workflow.isWorkflowMethodSupported(instance, transition_id):
valid_list.append(transition_id) valid_list.append(transition_id)
once_transition_key = once_transition_dict.get((wf_id, transition_id), once_transition_key = once_transition_dict.get((wf_id, transition_id))
None) if once_transition_key:
if once_transition_key is not None: # a run-once transition, prevent it from running again in
# a run-once transiction, prevent it from running in the # the same transaction
# same transaction again
transactional_variable[once_transition_key] = 1 transactional_variable[once_transition_key] = 1
elif candidate_workflow.__class__.__name__ == 'DCWorkflowDefinition': elif candidate_workflow.__class__.__name__ == 'DCWorkflowDefinition':
raise UnsupportedWorkflowMethod(instance, wf_id, transition_id) raise UnsupportedWorkflowMethod(instance, wf_id, transition_id)
......
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