code: def test_should_respect_caching_hash_method(
      self, hash_method, result, exception
  ):
      with conf_vars(
          {("webserver", "caching_hash_method"): hash_method}
      ):
          if exception:
              with pytest.raises(expected_exception=exception):
                  app = application.cached_app(testing=True)
          else:
              app = application.cached_app(testing=True)
              assert (
                  next(iter(app.extensions["cache"])).cache._hash_method
                  == result
              )
  
imports: from __future__ import annotations
  import hashlib
  import re
  import runpy
  import sys
  from datetime import timedelta
  from unittest import mock
  import pytest
  from werkzeug.routing import Rule
  from werkzeug.test import create_environ
  from werkzeug.wrappers import Response
  from airflow.exceptions import AirflowConfigException
  from airflow.www import app
  from tests.test_utils.config import conf_vars
  from tests.test_utils.decorators import dont_initialize_flask_app_submodules
label_desc: Use image node_id 8 for calling the TestApp obj's underlying member method code with example usage: obj.test_should_respect_caching_hash_method(hash_method, result, exception) without return types