|
|
|
@ -34,6 +34,23 @@ class ActionExecutionsTest(test.TestCase):
|
|
|
|
|
self.mock_action_executions_list.assert_called_once_with(
|
|
|
|
|
helpers.IsHttpRequest())
|
|
|
|
|
|
|
|
|
|
@helpers.create_mocks({api: ('action_execution_update',)})
|
|
|
|
|
def test_update_post(self):
|
|
|
|
|
action_execution = self.mistralclient_action_executions.first()
|
|
|
|
|
self.mock_action_execution_update.return_value = action_execution
|
|
|
|
|
form_data = {"action_execution_id": action_execution.id,
|
|
|
|
|
"state": action_execution.state,
|
|
|
|
|
"output_source": "raw",
|
|
|
|
|
"output_data": action_execution.output}
|
|
|
|
|
res = self.client.post(
|
|
|
|
|
reverse('horizon:mistral:action_executions:update',
|
|
|
|
|
args=(action_execution.id,)),
|
|
|
|
|
form_data)
|
|
|
|
|
self.assertNoFormErrors(res)
|
|
|
|
|
self.mock_action_execution_update.assert_called_once_with(
|
|
|
|
|
helpers.IsHttpRequest(), action_execution.id,
|
|
|
|
|
action_execution.state, action_execution.output)
|
|
|
|
|
|
|
|
|
|
@helpers.create_mocks({api: ('action_execution_get',)})
|
|
|
|
|
def test_detail(self):
|
|
|
|
|
action_execution = self.mistralclient_action_executions.list()[0]
|
|
|
|
|