old_contents: """Django settings for tests."""
  
  import os
  
  BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  
  
  # Quick-start development settings - unsuitable for production
  
  SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
  
  INTERNAL_IPS = ['127.0.0.1']
  
  LOGGING_CONFIG = None   # avoids spurious output in tests
  
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'debug_toolbar',
      'tests',
  ]
  
  MEDIA_URL = '/media/'   # Avoids https://code.djangoproject.com/ticket/21451
  
  MIDDLEWARE_CLASSES = [
      'debug_toolbar.middleware.DebugToolbarMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'tests.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'APP_DIRS': True,
          'OPTIONS': {},
      },
  ]
  
  STATIC_ROOT = os.path.join(BASE_DIR, 'tests', 'static')
  
  STATIC_URL = '/static/'
  
  STATICFILES_DIRS = [
      os.path.join(BASE_DIR, 'tests', 'additional_static'),
      ("prefix", os.path.join(BASE_DIR, 'tests', 'additional_static')),
  ]
  
  # Cache and database
  
  CACHES = {
      'default': {
          'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
      },
      'second': {
          'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
      },
  }
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
      }
  }
  
  
  # Debug Toolbar configuration
  
  DEBUG_TOOLBAR_CONFIG = {
      # Django's test client sets wsgi.multiprocess to True inappropriately
      'RENDER_PANELS': False,
  }
  
new_contents: """Django settings for tests."""
  
  import os
  
  BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  
  
  # Quick-start development settings - unsuitable for production
  
  SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
  
  INTERNAL_IPS = ['127.0.0.1']
  
  LOGGING_CONFIG = None   # avoids spurious output in tests
  
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'debug_toolbar',
      'tests',
  ]
  
  MEDIA_URL = '/media/'   # Avoids https://code.djangoproject.com/ticket/21451
  
  MIDDLEWARE_CLASSES = [
      'debug_toolbar.middleware.DebugToolbarMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'tests.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'APP_DIRS': True,
          'OPTIONS': {},
      },
  ]
  
  STATIC_ROOT = os.path.join(BASE_DIR, 'tests', 'static')
  
  STATIC_URL = '/static/'
  
  STATICFILES_DIRS = [
      os.path.join(BASE_DIR, 'tests', 'additional_static'),
      ("prefix", os.path.join(BASE_DIR, 'tests', 'additional_static')),
  ]
  
  # Cache and database
  
  CACHES = {
      'default': {
          'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
      },
      'second': {
          'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
      },
  }
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
      }
  }
  
  
  # Debug Toolbar configuration
  
  DEBUG_TOOLBAR_CONFIG = {
      # Django's test client sets wsgi.multiprocess to True inappropriately
      'RENDER_PANELS': False,
  }
  
subject: Add SessionAuthenticationMiddleware to test settings.py to silence warning