code: def test_url_for_with_scheme_not_external(self, app, req_ctx):
      app.add_url_rule("/", endpoint="index")
  
      # Implicit external with scheme.
      url = flask.url_for("index", _scheme="https")
      assert url == "https://localhost/"
  
      # Error when external=False with scheme
      with pytest.raises(ValueError):
          flask.url_for("index", _scheme="https", _external=False)
  
imports: import io
  import os
  import pytest
  import werkzeug.exceptions
  import flask
  from flask.helpers import get_debug_flag
label_desc: Use image node_id 3 for calling the TestUrlFor obj's underlying member method code with example usage: obj.test_url_for_with_scheme_not_external(app, req_ctx) without return types