#!/usr/bin/env python
"""Configure enough Django to run the test suite."""
import sys

from django.conf import settings

if not settings.configured:
    settings.configure(
        DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}},
        INSTALLED_APPS=[
            'django_nose',
        ],
    )

from django_nose import NoseTestSuiteRunner


def runtests(*test_labels):
    """Run the selected tests, or all tests if none selected."""
    runner = NoseTestSuiteRunner(verbosity=1, interactive=True)
    failures = runner.run_tests(test_labels)
    sys.exit(failures)


if __name__ == '__main__':
    runtests(*sys.argv[1:])

#!/usr/bin/env python
"""Configure enough Django to run the test suite."""
import sys

from django.conf import settings

if not settings.configured:
    settings.configure(
        DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}},
        INSTALLED_APPS=['django_nose'],
        MIDDLEWARE_CLASSES=[],
    )

from django_nose import NoseTestSuiteRunner


def runtests(*test_labels):
    """Run the selected tests, or all tests if none selected."""
    runner = NoseTestSuiteRunner(verbosity=1, interactive=True)
    failures = runner.run_tests(test_labels)
    sys.exit(failures)


if __name__ == '__main__':
    runtests(*sys.argv[1:])

Add MIDDLEWARE_CLASSES to runtests.py