Merge "Add the unit test for action_executions detail"
This commit is contained in:
commit
63f404e38c
|
@ -33,3 +33,15 @@ class ActionExecutionsTest(test.TestCase):
|
||||||
self.assertTemplateUsed(res, 'mistral/action_executions/index.html')
|
self.assertTemplateUsed(res, 'mistral/action_executions/index.html')
|
||||||
self.mock_action_executions_list.assert_called_once_with(
|
self.mock_action_executions_list.assert_called_once_with(
|
||||||
helpers.IsHttpRequest())
|
helpers.IsHttpRequest())
|
||||||
|
|
||||||
|
@helpers.create_mocks({api: ('action_execution_get',)})
|
||||||
|
def test_detail(self):
|
||||||
|
action_execution = self.mistralclient_action_executions.list()[0]
|
||||||
|
self.mock_action_execution_get.return_value = action_execution
|
||||||
|
url = reverse('horizon:mistral:action_executions:detail',
|
||||||
|
args=[action_execution.id])
|
||||||
|
res = self.client.get(url)
|
||||||
|
|
||||||
|
self.assertTemplateUsed(res, 'mistral/action_executions/detail.html')
|
||||||
|
self.mock_action_execution_get.assert_called_once_with(
|
||||||
|
helpers.IsHttpRequest(), action_execution.id)
|
||||||
|
|
|
@ -140,6 +140,8 @@ def data(TEST):
|
||||||
'workflow_name': 'my work flow',
|
'workflow_name': 'my work flow',
|
||||||
'task_execution_id': '1',
|
'task_execution_id': '1',
|
||||||
'task_name': 'b',
|
'task_name': 'b',
|
||||||
|
'input': "1",
|
||||||
|
'output': "1",
|
||||||
'description': '',
|
'description': '',
|
||||||
'created_at': '1',
|
'created_at': '1',
|
||||||
'updated_at': '1',
|
'updated_at': '1',
|
||||||
|
|
Loading…
Reference in New Issue