

def _prepare_task(self, name):
    cluster = self.env.create(cluster_kwargs={
        
    }, nodes_kwargs=[{
        'api': False,
    }, {
        'api': False,
    }])
    task = Task(uuid=str(uuid.uuid4()), name=name, status=consts.TASK_STATUSES.running, cluster_id=cluster.id)
    self.db.add(task)
    task.db.flush()
    return task

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_rpc_consumer.py TestConsumer._prepare_task/VarMisuse@93/106 `self`->`task`