

def test_task_progress(self):
    cluster = self.env.create_cluster()
    task = Task(uuid=str(uuid.uuid4()), name='super', status='running', cluster_id=cluster.id)
    self.db.add(task)
    self.db.commit()
    kwargs = {
        'task_uuid': task.uuid,
        'progress': 20,
    }
    self.receiver.deploy_resp(**kwargs)
    self.db.refresh(task)
    self.assertEqual(task.progress, 20)
    self.assertEqual(task.status, 'running')

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