Add workflow list unit test in db layer

Change-Id: Iec8edc7e9113bafc017a55a0831d82950542a7e3
This commit is contained in:
lawrancejing 2015-12-14 07:27:13 +00:00
parent 4b3dbd9fa7
commit 879bfd07d3
2 changed files with 9 additions and 0 deletions

View File

@ -24,3 +24,7 @@ class DBWorkflowTestCase(base.DBTestCase):
def test_workflow_create(self):
workflow = utils.workflow_create(self.context)
self.assertEqual(workflow.name, 'test-workflow')
def test_workflow_list(self):
workflows = utils.workflow_list(self.context)
self.assertFalse(workflows)

View File

@ -35,3 +35,8 @@ def workflow_create(context):
values = {"name": "test-workflow"}
workflow = db_api.workflow_create(context, values)
return workflow
def workflow_list(context):
workflows = db_api.workflow_get_all(context)
return workflows