code: def test_basic_url_generation(app):
      app.config["SERVER_NAME"] = "localhost"
      app.config["PREFERRED_URL_SCHEME"] = "https"
  
      @app.route("/")
      def index():
          pass
  
      with app.app_context():
          rv = flask.url_for("index")
          assert rv == "https://localhost/"
  
file_path: flask/tests/test_appctx.py
imports: import pytest
  import flask
  from flask.globals import app_ctx
  from flask.globals import request_ctx
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic_url_generation(app) without return types