Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.6.x] Refs #21197 -- Clarified upgrade check message.

Thanks to Carl and Shai for the discussion.

Backport of 8ff4303 from master.
  • Loading branch information...
commit 7f0fdffd07df71409fc44a3a039c25bf01ca1310 1 parent 563b5c2
@freakboy3742 freakboy3742 authored
View
6 django/core/checks/compatibility/django_1_6_0.py
@@ -16,10 +16,8 @@ def check_test_runner():
if test_runner_setting == new_default:
message = [
- "You have not explicitly set 'TEST_RUNNER'. In Django 1.6,",
- "there is a new test runner ('%s')" % new_default,
- "by default. You should ensure your tests are still all",
- "running & behaving as expected. See",
+ "Django 1.6 introduced a new default test runner ('%s')" % new_default,
+ "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.",
]
View
8 tests/check/tests.py
@@ -39,7 +39,7 @@ def tearDown(self):
def test_check_test_runner_new_default(self):
with self.settings(TEST_RUNNER='django.test.runner.DiscoverRunner'):
result = django_1_6_0.check_test_runner()
- self.assertTrue("You have not explicitly set 'TEST_RUNNER'" in result)
+ self.assertTrue("Django 1.6 introduced a new default test runner" in result)
def test_check_test_runner_overridden(self):
with self.settings(TEST_RUNNER='myapp.test.CustomRunnner'):
@@ -49,7 +49,7 @@ def test_run_checks_new_default(self):
with self.settings(TEST_RUNNER='django.test.runner.DiscoverRunner'):
result = django_1_6_0.run_checks()
self.assertEqual(len(result), 1)
- self.assertTrue("You have not explicitly set 'TEST_RUNNER'" in result[0])
+ self.assertTrue("Django 1.6 introduced a new default test runner" in result[0])
def test_run_checks_overridden(self):
with self.settings(TEST_RUNNER='myapp.test.CustomRunnner'):
@@ -77,7 +77,7 @@ def test_check_compatibility(self):
with self.settings(TEST_RUNNER='django.test.runner.DiscoverRunner'):
result = base.check_compatibility()
self.assertEqual(len(result), 1)
- self.assertTrue("You have not explicitly set 'TEST_RUNNER'" in result[0])
+ self.assertTrue("Django 1.6 introduced a new default test runner" in result[0])
with self.settings(TEST_RUNNER='myapp.test.CustomRunnner'):
self.assertEqual(len(base.check_compatibility()), 0)
@@ -121,7 +121,7 @@ def test_management_command(self):
call_command('check')
self.assertEqual(len(check.warnings._warnings), 1)
- self.assertTrue("You have not explicitly set 'TEST_RUNNER'" in check.warnings._warnings[0])
+ self.assertTrue("Django 1.6 introduced a new default test runner" in check.warnings._warnings[0])
# Restore the ``warnings``.
base.warnings = old_warnings
Please sign in to comment.
Something went wrong with that request. Please try again.