

def _prepare_sub_task(self, name):
    task = self._prepare_task(consts.TASK_NAMES.super)
    sub_task = Task(uuid=str(uuid.uuid4()), name=name, status=consts.TASK_STATUSES.running, cluster_id=self.env.clusters[0].id, parent_id=task.id)
    self.db.add(sub_task)
    self.db.flush()
    return sub_task

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_rpc_consumer.py TestConsumer._prepare_sub_task/original