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

Fixed #27238 -- Disabled check_pattern_startswith_slash if settings.APPEND_SLASH=False.

Thanks strycore for the report and timgraham for suggesting the
solution.
This commit is contained in:
Alasdair Nicol
2016-09-19 21:18:41 +01:00
committed by Tim Graham
parent 1a9f6db5ff
commit 911d9f4ed1
3 changed files with 17 additions and 0 deletions

View File

@@ -55,6 +55,16 @@ class CheckUrlsTest(SimpleTestCase):
self.assertIn(expected_msg, warning.msg)
@override_settings(
ROOT_URLCONF='check_framework.urls.beginning_with_slash',
APPEND_SLASH=False,
)
def test_beginning_with_slash_append_slash(self):
# It can be useful to start a URL pattern with a slash when
# APPEND_SLASH=False (#27238).
result = check_url_config(None)
self.assertEqual(result, [])
@override_settings(ROOT_URLCONF='check_framework.urls.name_with_colon')
def test_name_with_colon(self):
result = check_url_config(None)