'Verify that url_for works when an Api object is mounted on a
Blueprint.'

def test_url_for_with_blueprint(self):

    api_bp = Blueprint('api', __name__)
    app = Flask(__name__)
    api = flask_restful.Api(api_bp)
    api.add_resource(HelloWorld, '/foo/<string:bar>')
    app.register_blueprint(api_bp)
    with app.test_request_context('/foo'):
        self.assertEqual(api.url_for(HelloWorld, bar='baz'), '/foo/baz')
