def tearDownClass(cls): for name in cls.wf_names: db_api.workflow_destroy('', name) for id in cls.lb_ids: db_api.logbook_destroy('', id) for id in cls.job_ids: db_api.job_destroy('', id) cls.wf_ids = [] cls.wf_names = [] cls.lb_ids = [] cls.lb_names = [] cls.job_ids = [] cls.job_names = []
def test_job_destroy(self): id = self.job_ids.pop() db_api.job_destroy('', id) self.job_names.pop() self.assertRaises(exception.NotFound, db_api.job_get, '', id)