code: def test_cors(
      app_client_with_cors,
      app_client_two_attached_databases_one_immutable,
      path,
      status_code,
  ):
      response = app_client_with_cors.get(path)
      assert response.status == status_code
      assert response.headers["Access-Control-Allow-Origin"] == "*"
      assert (
          response.headers["Access-Control-Allow-Headers"]
          == "Authorization, Content-Type"
      )
      assert response.headers["Access-Control-Expose-Headers"] == "Link"
      assert (
          response.headers["Access-Control-Allow-Methods"]
          == "GET, POST, HEAD, OPTIONS"
      )
      assert response.headers["Access-Control-Max-Age"] == "3600"
      # Same request to app_client_two_attached_databases_one_immutable
      # should not have those headers - I'm using that fixture because
      # regular app_client doesn't have immutable fixtures.db which means
      # the test for /fixtures.db returns a 403 error
      response = app_client_two_attached_databases_one_immutable.get(
          path
      )
      assert response.status == status_code
      assert "Access-Control-Allow-Origin" not in response.headers
      assert "Access-Control-Allow-Headers" not in response.headers
      assert "Access-Control-Expose-Headers" not in response.headers
      assert "Access-Control-Allow-Methods" not in response.headers
      assert "Access-Control-Max-Age" not in response.headers
  
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 8 for calling a global function with example usage: test_cors(app_client_with_cors, app_client_two_attached_databases_one_immutable, path, status_code) without return types