Merge "Add the unit test for action_executions detail"

This commit is contained in:
Zuul 2019-06-21 05:34:03 +00:00 committed by Gerrit Code Review
commit 63f404e38c
2 changed files with 14 additions and 0 deletions

View File

@ -33,3 +33,15 @@ class ActionExecutionsTest(test.TestCase):
self.assertTemplateUsed(res, 'mistral/action_executions/index.html')
self.mock_action_executions_list.assert_called_once_with(
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)

View File

@ -140,6 +140,8 @@ def data(TEST):
'workflow_name': 'my work flow',
'task_execution_id': '1',
'task_name': 'b',
'input': "1",
'output': "1",
'description': '',
'created_at': '1',
'updated_at': '1',