

def test_update_config_resp(self):
    cluster = self.env.create(cluster_kwargs={
        
    }, nodes_kwargs=[{
        'api': False,
        'roles': ['controller'],
        'status': consts.NODE_STATUSES.deploying,
    }, {
        'api': False,
        'roles': ['compute'],
        'status': consts.NODE_STATUSES.deploying,
    }])
    nodes = self.env.nodes
    task = Task(uuid=str(uuid.uuid4()), name=consts.TASK_NAMES.deployment, cluster_id=cluster.id)
    task.cache = {
        'nodes': [nodes[0].uid, nodes[1].uid],
    }
    self.db.add(task)
    self.db.commit()
    kwargs = {
        'task_uuid': task.uuid,
        'status': consts.TASK_STATUSES.ready,
        'progress': 100,
    }
    self.receiver.update_config_resp(**kwargs)
    self.db.refresh(nodes[0])
    task.db.refresh(nodes[1])
    self.db.refresh(task)
    self.assertEqual(nodes[0].status, consts.NODE_STATUSES.ready)
    self.assertEqual(nodes[1].status, consts.NODE_STATUSES.ready)
    self.assertEqual(task.status, consts.TASK_STATUSES.ready)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_rpc_consumer.py TestConsumer.test_update_config_resp/VarMisuse@211/258 `self`->`task`