

def test_node_provision_resp(self):
    cluster = self.env.create(cluster_kwargs={
        
    }, nodes_kwargs=[{
        'api': False,
    }, {
        'api': False,
    }])
    node = self.env.nodes[0]
    node2 = self.env.nodes[1]
    task = Task(name='provision', cluster_id=cluster.id)
    self.db.add(task)
    self.db.commit()
    kwargs = {
        'task_uuid': task.uuid,
        'status': 'running',
        'nodes': [{
            'uid': node.id,
            'status': 'provisioning',
            'progress': 50,
        }, {
            'uid': node2.id,
            'status': 'provisioning',
            'progress': 50,
        }],
    }
    self.receiver.provision_resp(**kwargs)
    self.db.refresh(task)
    self.assertEqual(task.progress, 50)

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