def delete(self, task_id=None, force=False): """Delete a specific task and related results. :param task_id: Task uuid :param force: Force delete or not """ api.delete_task(task_id, force=force)
def delete(self, task_id=None, force=False): """Delete a specific task and related results. :param task_id: Task uuid or a list of task uuids :param force: Force delete or not """ if isinstance(task_id, list): for tid in task_id: api.delete_task(tid, force=force) else: api.delete_task(task_id, force=force)
def test_delete_task_force(self, mock_delete): api.delete_task(self.task_uuid, force=True) mock_delete.assert_called_once_with(self.task_uuid, status=None)
def test_delete_task(self, mock_delete): api.delete_task(self.task_uuid) mock_delete.assert_called_once_with( self.task_uuid, status=consts.TaskStatus.FINISHED)
def delete(self, task_id, force): """Delete a specific task and related results.""" api.delete_task(task_id, force=force)