diff options
| author | Buddy Lindsey, Jr <buddy@buddylindsey.com> | 2016-02-01 11:24:33 -0600 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-02-01 14:00:08 -0500 |
| commit | 3a063b0dcc54458731e0c4c5b2eef0032ddd41b2 (patch) | |
| tree | 479b869109b7c5dfb23c421e04e9dbbffa6f40d1 /tests/check_framework | |
| parent | fe41a134bcecd0fc7b6905a46bf055fca100fe28 (diff) | |
[1.9.x] Fixed #26155 -- Skipped URL checks if no ROOTURL_CONF setting.
Backport of 731bdfe68ae8dd332702b1838db44f0efe433e2e from master
Diffstat (limited to 'tests/check_framework')
| -rw-r--r-- | tests/check_framework/test_urls.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/check_framework/test_urls.py b/tests/check_framework/test_urls.py index 19f2d2990e..7fe13c9c40 100644 --- a/tests/check_framework/test_urls.py +++ b/tests/check_framework/test_urls.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.core.checks.urls import check_url_config from django.test import SimpleTestCase from django.test.utils import override_settings @@ -35,3 +36,9 @@ class CheckUrlsTest(SimpleTestCase): self.assertEqual(warning.id, 'urls.W003') expected_msg = "Your URL pattern '^$' [name='name_with:colon'] has a name including a ':'." self.assertIn(expected_msg, warning.msg) + + @override_settings(ROOT_URLCONF=None) + def test_no_root_urlconf_in_settings(self): + delattr(settings, 'ROOT_URLCONF') + result = check_url_config(None) + self.assertEqual(result, []) |
