Add the unit test for action_executions detail
Change-Id: I4bc34845cdf33869e840659e9c4138019d6c3575
This commit is contained in:
parent
1527b4faa7
commit
8bceb199d6
@ -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)
|
||||||
|
@ -141,6 +141,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
Block a user