Add workflow list unit test in db layer
Change-Id: Iec8edc7e9113bafc017a55a0831d82950542a7e3
This commit is contained in:
parent
4b3dbd9fa7
commit
879bfd07d3
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue