old_contents: #!/usr/bin/env python
  import sys
  from optparse import OptionParser
  from os.path import abspath, dirname
  from django.test.simple import DjangoTestSuiteRunner
  
  
  def runtests(*test_args, **kwargs):
      parent = dirname(abspath(__file__))
      sys.path.insert(0, parent)
      test_runner = DjangoTestSuiteRunner(
          verbosity=kwargs.get('verbosity', 1),
          interactive=kwargs.get('interactive', False),
          failfast=kwargs.get('failfast')
      )
      failures = test_runner.run_tests(test_args)
      sys.exit(failures)
  
  if __name__ == '__main__':
      parser = OptionParser()
      parser.add_option('--failfast', action='store_true', default=False, dest='failfast')
  
      (options, args) = parser.parse_args()
  
      runtests(failfast=options.failfast, *args)
new_contents: #!/usr/bin/env python
  import os
  import sys
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
  
  from django.test.utils import get_runner
  from django.conf import settings
  import django
  
  if django.VERSION >= (1, 7):
      django.setup()
  
  
  def runtests():
      TestRunner = get_runner(settings)
      test_runner = TestRunner(verbosity=1, interactive=True)
      failures = test_runner.run_tests(['tests'])
      sys.exit(bool(failures))
  
  
  if __name__ == '__main__':
      runtests()
  
subject: Make test runner only run basis tests