def test_logbook_destroy(self): # Delete the last added logbook id = self.lb_ids.pop() b_api.logbook_destroy(id) self.lb_names.pop() # Check that the deleted logbook is no longer there self.assertRaises(exception.NotFound, b_api.logbook_get, id)
def tearDown(self): # Destroy all flowdetails and logbooks in the backend for id in self.fd_ids: b_api.flowdetail_destroy(id) for id in self.lb_ids: b_api.logbook_destroy(id) # Clear the lists of logbook and flowdetail uuids and names utils.drain(self.lb_names) utils.drain(self.lb_ids) utils.drain(self.fd_names) utils.drain(self.fd_ids)