def delete(cls, id): with database.database.atomic(): cell = Cell.get(Cell.id == id) try: from .ras.forms import RasTargetForm RasTargetForm.delete_nonexists_target('cell', cell.name) except Exception as e: logger.exception(e) cell.delete_instance() CellNode.delete().where(CellNode.cell == id).execute()
def tearDown(self): CellNode.delete().execute() Cell.delete().execute() Node.delete().execute()