Merge "Add workflow list unit test in db layer"

This commit is contained in:
Jenkins 2015-12-14 09:24:50 +00:00 committed by Gerrit Code Review
commit 46ba865b88
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