From 8ff43039466f5e3c78d3587fdbe229ed44c4e1aa Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 8 Oct 2013 10:00:39 +0800 Subject: [PATCH] Refs #21197 -- Clarified upgrade check message. Thanks to Carl and Shai for the discussion. --- django/core/checks/compatibility/django_1_6_0.py | 6 ++---- tests/check/tests.py | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/django/core/checks/compatibility/django_1_6_0.py b/django/core/checks/compatibility/django_1_6_0.py index e38b2d32ec..96b29d6b77 100644 --- a/django/core/checks/compatibility/django_1_6_0.py +++ b/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.", ] diff --git a/tests/check/tests.py b/tests/check/tests.py index 3faf086557..19b3840a9a 100644 --- a/tests/check/tests.py +++ b/tests/check/tests.py @@ -39,7 +39,7 @@ class CompatChecksTestCase(TestCase): 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 @@ class CompatChecksTestCase(TestCase): 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 @@ class CompatChecksTestCase(TestCase): 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 @@ class CompatChecksTestCase(TestCase): 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