old_contents: from os.path import join as pjoin, abspath, dirname, pardir
  
  import django
  
  SECRET_KEY = 'SECRET'
  PROJ_ROOT = abspath(pjoin(dirname(__file__), pardir))
  DATA_ROOT = pjoin(PROJ_ROOT, 'data')
  THUMBNAIL_PREFIX = 'test/cache/'
  THUMBNAIL_DEBUG = True
  THUMBNAIL_LOG_HANDLER = {
      'class': 'sorl.thumbnail.log.ThumbnailLogHandler',
      'level': 'ERROR',
  }
  THUMBNAIL_KVSTORE = 'tests.thumbnail_tests.kvstore.TestKVStore'
  THUMBNAIL_STORAGE = 'tests.thumbnail_tests.storage.TestStorage'
  DEFAULT_FILE_STORAGE = 'tests.thumbnail_tests.storage.TestStorage'
  ADMINS = (
      ('Sorl', 'thumbnail@sorl.net'),
  )
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': ':memory:',
      }
  }
  MEDIA_ROOT = pjoin(PROJ_ROOT, 'media')
  MEDIA_URL = '/media/'
  ROOT_URLCONF = 'tests.thumbnail_tests.urls'
  INSTALLED_APPS = (
      'sorl.thumbnail',
      'tests.thumbnail_tests',
  )
  
  TEMPLATE_CONTEXT_PROCESSORS = (
      'django.core.context_processors.request',
  )
  MIDDLEWARE_CLASSES = (
      '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',
  )
  
new_contents: from os.path import join as pjoin, abspath, dirname, pardir
  
  import django
  
  SECRET_KEY = 'SECRET'
  PROJ_ROOT = abspath(pjoin(dirname(__file__), pardir))
  DATA_ROOT = pjoin(PROJ_ROOT, 'data')
  THUMBNAIL_PREFIX = 'test/cache/'
  THUMBNAIL_DEBUG = True
  THUMBNAIL_LOG_HANDLER = {
      'class': 'sorl.thumbnail.log.ThumbnailLogHandler',
      'level': 'ERROR',
  }
  THUMBNAIL_KVSTORE = 'tests.thumbnail_tests.kvstore.TestKVStore'
  THUMBNAIL_STORAGE = 'tests.thumbnail_tests.storage.TestStorage'
  DEFAULT_FILE_STORAGE = 'tests.thumbnail_tests.storage.TestStorage'
  ADMINS = (
      ('Sorl', 'thumbnail@sorl.net'),
  )
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': ':memory:',
      }
  }
  MEDIA_ROOT = pjoin(PROJ_ROOT, 'media')
  MEDIA_URL = '/media/'
  ROOT_URLCONF = 'tests.thumbnail_tests.urls'
  INSTALLED_APPS = (
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'sorl.thumbnail',
      'tests.thumbnail_tests',
  )
  
  TEMPLATE_CONTEXT_PROCESSORS = (
      'django.core.context_processors.request',
  )
  MIDDLEWARE_CLASSES = (
      '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',
  )
  
subject: Fix for django1.9: Client.get build a request importing ContentType and Permission models