Fixing 1_6.W001 when upgrading from Django 1.5 to 1.7

After upgrading a Django project from Django 1.5 to the current beta of Django 1.7, running the tests triggered a warning:

System check identified some issues:

WARNINGS:

?: (1_6.W001) Some project unittests may not execute as expected.
	HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#discovery-of-tests-in-any-test-module for more information.

This warning is printed by the System Check Framework, which is new in Django 1.7 and checks your project for common problems. You can run it manually with the “check” management command.

python manage.py check

After verifying that all my tests are run, I was left wondering how I can silence the warning after reading (okay, let’s be honest: skimming) the release notes of 1.6. The answer is simple, but I had to look in the source of the system check framework to find it. Apparently you have to explicitly define a test runner starting from Django 1.6. To do so, add the following line to your settings:

TEST_RUNNER = 'django.test.runner.DiscoverRunner'