diff options
| author | Alasdair Nicol <alasdair@thenicols.net> | 2016-09-19 21:18:41 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-09-19 21:00:12 -0400 |
| commit | 911d9f4ed1a39f945769b7198a419850378f9824 (patch) | |
| tree | 31ff272b781472e1c71f22f0eb272ca2f0fc9685 /tests/check_framework | |
| parent | 1a9f6db5ffd2d5e71d73340ab59476572e05a728 (diff) | |
Fixed #27238 -- Disabled check_pattern_startswith_slash if settings.APPEND_SLASH=False.
Thanks strycore for the report and timgraham for suggesting the
solution.
Diffstat (limited to 'tests/check_framework')
| -rw-r--r-- | tests/check_framework/test_urls.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/check_framework/test_urls.py b/tests/check_framework/test_urls.py index 926d1947dd..3418af8ac0 100644 --- a/tests/check_framework/test_urls.py +++ b/tests/check_framework/test_urls.py @@ -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) |
