code: def test_config_force_https_urls():
      with make_app_client(
          settings={"force_https_urls": True}
      ) as client:
          response = client.get(
              "/fixtures/facetable.json?_size=3&_facet=state&_extra=next_url,suggested_facets"
          )
          assert response.json["next_url"].startswith("https://")
          assert response.json["facet_results"]["results"]["state"][
              "results"
          ][0]["toggle_url"].startswith("https://")
          assert response.json["suggested_facets"][0][
              "toggle_url"
          ].startswith("https://")
          # Also confirm that request.url and request.scheme are set correctly
          response = client.get("/")
          assert client.ds._last_request.url.startswith("https://")
          assert client.ds._last_request.scheme == "https"
  
file_path: datasette/tests/test_api.py
imports: from datasette.app import Datasette
  from datasette.plugins import DEFAULT_PLUGINS
  from datasette.utils.sqlite import supports_table_xinfo
  from datasette.version import __version__
  from .fixtures import app_client, app_client_no_files, app_client_with_dot, app_client_shorter_time_limit, app_client_two_attached_databases_one_immutable, app_client_larger_cache_size, app_client_with_cors, app_client_two_attached_databases, app_client_conflicting_database_names, app_client_immutable_and_inspect_file, make_app_client, EXPECTED_PLUGINS, METADATA
  import pathlib
  import pytest
  import sys
  import urllib
label_desc: Use image node_id 7 for calling a global function with example usage: test_config_force_https_urls() without return types