

def test_node_deploy_resp(self):
    cluster = self.env.create(cluster_kwargs={
        
    }, nodes_kwargs=[{
        'api': False,
    }, {
        'api': False,
    }])
    (node, node2) = self.env.nodes
    task = Task(uuid=str(uuid.uuid4()), name='deploy', cluster_id=cluster.id)
    self.db.add(task)
    self.db.commit()
    kwargs = {
        'task_uuid': task.uuid,
        'nodes': [{
            'uid': node.id,
            'status': 'deploying',
        }, {
            'uid': node2.id,
            'status': 'error',
        }],
    }
    self.receiver.deploy_resp(**kwargs)
    self.db.refresh(node)
    self.db.refresh(node2)
    self.db.refresh(task)
    self.assertEqual((node.status, node2.status), ('deploying', 'error'))
    self.assertEqual(task.status, 'running')

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