Add the unit test for workbooks detail
Change-Id: Idd8a862f396d8edcf26a7e4ba066946ec5f80aa3
This commit is contained in:
parent
d1df6b3998
commit
21663e507e
@ -134,3 +134,15 @@ class WorkflowsTest(test.TestCase):
|
|||||||
helpers.IsHttpRequest())
|
helpers.IsHttpRequest())
|
||||||
self.assertNoFormErrors(res)
|
self.assertNoFormErrors(res)
|
||||||
self.assertRedirectsNoFollow(res, INDEX_URL)
|
self.assertRedirectsNoFollow(res, INDEX_URL)
|
||||||
|
|
||||||
|
@helpers.create_mocks({api: ('workbook_get',)})
|
||||||
|
def test_detail(self):
|
||||||
|
workbook = self.mistralclient_workbooks.list()[0]
|
||||||
|
self.mock_workbook_get.return_value = workbook
|
||||||
|
url = reverse('horizon:mistral:workbooks:detail',
|
||||||
|
args=[workbook.name])
|
||||||
|
res = self.client.get(url)
|
||||||
|
|
||||||
|
self.assertTemplateUsed(res, 'mistral/workbooks/detail.html')
|
||||||
|
self.mock_workbook_get.assert_called_once_with(
|
||||||
|
helpers.IsHttpRequest(), workbook.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user