コード例 #1
0
    def test_workflow_get(self):
        expected = self.wf_ids[0]
        actual = db_api.workflow_get('', self.wf_names[0]).id

        self.assertEquals(expected, actual)

        self.assertRaises(exception.NotFound, db_api.workflow_get, '',
                          u'workflow_9001')
コード例 #2
0
    def test_workflow_get(self):
        expected = self.wf_ids[0]
        actual = db_api.workflow_get('', self.wf_names[0]).id

        self.assertEquals(expected, actual)

        self.assertRaises(exception.NotFound, db_api.workflow_get, '',
                          u'workflow_9001')
コード例 #3
0
    def test_workflow_create(self):
        id = 0
        while (self.wf_ids.count(id) > 0):
            id = id + 1
        wf_tmp = db_api.workflow_create('', u'workflow_{0}'.format(id))
        self.wf_ids.append(id)
        self.wf_names.append(u'workflow_{0}'.format(id))

        self.assertIsNotNone(db_api.workflow_get('',
                             u'workflow_{0}'.format(id)))
コード例 #4
0
    def test_workflow_create(self):
        id = 0
        while (self.wf_ids.count(id) > 0):
            id = id + 1
        wf_tmp = db_api.workflow_create('', u'workflow_{0}'.format(id))
        self.wf_ids.append(id)
        self.wf_names.append(u'workflow_{0}'.format(id))

        self.assertIsNotNone(
            db_api.workflow_get('', u'workflow_{0}'.format(id)))