

def test_provision_resp_nodes_failed(self):
    task = self._prepare_task(consts.TASK_NAMES.provision)
    kwargs = {
        'task_uuid': task.uuid,
        'progress': 20,
        'status': consts.TASK_STATUSES.ready,
        'nodes': [{
            'uid': self.env.nodes[0].id,
            'status': consts.TASK_STATUSES.error,
            'progress': 50,
        }, {
            'uid': self.env.nodes[1].id,
            'status': consts.TASK_STATUSES.error,
            'progress': 50,
        }],
    }
    self.receiver.provision_resp(**kwargs)
    notifications_number = task.db.query(Notification).filter_by(cluster_id=task.cluster_id).count()
    self.assertEqual(1, notifications_number)
    self.assertRegexpMatches(task.message, "Provision has failed\\. Check these nodes:\n'(.*)', '(.*)'")

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_rpc_consumer.py TestConsumer.test_provision_resp_nodes_failed/VarMisuse@131/178 `self`->`task`