old_contents: #!/usr/bin/env python
  import os
  import sys
  
  from django.conf import settings
  from django.core.management import execute_from_command_line
  
  
  if not settings.configured:
      settings.configure(
          DATABASES={
              'default': {
                  'ENGINE': 'django.db.backends.sqlite3',
              }
          },
          INSTALLED_APPS=[
              'modelcluster',
  
              'django.contrib.contenttypes',
              'taggit',
  
              'tests',
          ],
          USE_TZ=True,
          TIME_ZONE='America/Chicago',
      )
  
  
  def runtests():
      argv = sys.argv[:1] + ['test'] + sys.argv[1:]
      execute_from_command_line(argv)
  
  
  if __name__ == '__main__':
      runtests()
  
  
new_contents: #!/usr/bin/env python
  import os
  import sys
  
  from django.conf import settings
  from django.core.management import execute_from_command_line
  
  
  if not settings.configured:
      settings.configure(
          DATABASES={
              'default': {
                  'ENGINE': 'django.db.backends.sqlite3',
              }
          },
          INSTALLED_APPS=[
              'modelcluster',
  
              'django.contrib.contenttypes',
              'taggit',
  
              'tests',
          ],
          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',
          ),
          USE_TZ=True,
          TIME_ZONE='America/Chicago',
      )
  
  
  def runtests():
      argv = sys.argv[:1] + ['test'] + sys.argv[1:]
      execute_from_command_line(argv)
  
  
  if __name__ == '__main__':
      runtests()
  
  
subject: add explicit MIDDLEWARE_CLASSES to runtests.py to silence warning in django 1.7