1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Added an explicit test that URL checks are recursive.

This commit is contained in:
Alasdair Nicol
2016-04-27 22:38:00 +01:00
committed by Tim Graham
parent 86573861a9
commit ffb1c532ec
5 changed files with 20 additions and 11 deletions

View File

@@ -10,6 +10,14 @@ class CheckUrlsTest(SimpleTestCase):
result = check_url_config(None)
self.assertEqual(result, [])
@override_settings(ROOT_URLCONF='check_framework.urls.warning_in_include')
def test_check_resolver_recursive(self):
# The resolver is checked recursively (examining url()s in include()).
result = check_url_config(None)
self.assertEqual(len(result), 1)
warning = result[0]
self.assertEqual(warning.id, 'urls.W001')
@override_settings(ROOT_URLCONF='check_framework.urls.include_with_dollar')
def test_include_with_dollar(self):
result = check_url_config(None)