def teardownClass(cls): for id in cls.tsk_ids: db_api.task_destroy('', id) for name in cls.wf_names: db_api.workflow_destroy('', name) cls.tsk_ids = [] cls.tsk_names = [] cls.wf_ids = [] cls.wf_names = []
def test_task_destroy(self): id = self.tsk_ids.pop() db_api.task_destroy('', id) self.tsk_names.pop() self.assertRaises(exception.NotFound, db_api.task_get, '', id)
def teardownClass(cls): for id in cls.tsk_ids: db_api.task_destroy('', id) cls.tsk_ids = [] cls.tsk_names = []