示例#1
0
 def test_get_decisions(self, decider, mocker):
     mocker.patch('floto.decider.DecisionBuilder.get_decisions',
                  return_value=['d'])
     mocker.patch('floto.decider.DecisionBuilder.is_terminate_workflow',
                  return_value=True)
     decider.get_decisions()
     assert decider.decisions == ['d']
     assert decider.terminate_workflow == True
示例#2
0
 def test_get_decisions(self, decider, mocker):
     mocker.patch('floto.decider.DecisionBuilder.get_decisions', return_value=['d'])
     mocker.patch('floto.decider.DecisionBuilder.is_terminate_workflow', return_value=True)
     mocker.patch('floto.decider.Base.get_workflow_execution_description', return_value='desc')
     decider.get_decisions()
     assert decider.decisions == ['d']
     assert decider.terminate_workflow == True
     assert decider.decision_builder.current_workflow_execution_description == 'desc'
示例#3
0
 def test_get_decisions(self, decider, mocker, task):
     mocker.patch('floto.History.get_workflow_input', return_value='wf_input')
     mocker.patch('floto.decider.DynamicDecider.get_activity_tasks_from_input', 
             return_value=[task])
     mocker.patch('floto.decider.DecisionBuilder.get_decisions')
     mocker.patch('floto.decider.DecisionBuilder.is_terminate_workflow', return_value=True)
     decider.get_decisions()
     decider.get_activity_tasks_from_input.assert_called_once_with('wf_input')
     assert decider.terminate_workflow
示例#4
0
 def test_get_decisions(self, decider, mocker, task):
     mocker.patch('floto.History.get_workflow_input',
                  return_value='wf_input')
     mocker.patch(
         'floto.decider.DynamicDecider.get_activity_tasks_from_input',
         return_value=[task])
     mocker.patch('floto.decider.DecisionBuilder.get_decisions')
     mocker.patch('floto.decider.DecisionBuilder.is_terminate_workflow',
                  return_value=True)
     decider.get_decisions()
     decider.get_activity_tasks_from_input.assert_called_once_with(
         'wf_input')
     assert decider.terminate_workflow
示例#5
0
 def test_get_decisions(self, decider, mocker):
     mocker.patch('floto.decider.DecisionBuilder.get_decisions', return_value=['d'])
     mocker.patch('floto.decider.DecisionBuilder.is_terminate_workflow', return_value=True)
     decider.get_decisions()
     assert decider.decisions == ['d']
     assert decider.terminate_workflow == True