#!/usr/bin/env python

import os
import sys

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings")
this_dir = os.path.abspath(os.path.dirname(__file__))
if this_dir not in sys.path:
	sys.path.insert(0, this_dir)

from django.test.utils import get_runner
from django.conf import settings

def runtests():
	TestRunner = get_runner(settings)
	test_runner = TestRunner(verbosity=1, interactive=True, failfast=False)
	failures = test_runner.run_tests(["base", "threads", "events", "managers"])
	sys.exit(bool(failures))

if __name__ == "__main__":
	runtests()

@@ -223,16 +223,30 @@
 s_dir)%0A%0A
+import django%0A
 from dja
@@ -328,16 +328,63 @@
 ests():%0A
+%09if not settings.configured:%0A%09%09django.setup()%0A%0A
 %09TestRun

Support for django-1.7 setup