code: def test_url_for(self, app):
      api = restplus.Api(app)
      api.add_resource(HelloWorld, "/ids/<int:id>")
      with app.test_request_context("/foo"):
          assert api.url_for(HelloWorld, id=123) == "/ids/123"
  
imports: from __future__ import unicode_literals
  import flask
  import pytest
  import six
  from json import dumps, JSONEncoder
  from flask import Blueprint, redirect, views
  from werkzeug.exceptions import HTTPException, Unauthorized, BadRequest
  import flask_restplus
label_desc: Use image node_id 31 for calling the APITest obj's underlying member method code with example usage: obj.test_url_for(app) without return types