summaryrefslogtreecommitdiff
path: root/tests/check_framework
diff options
context:
space:
mode:
authorRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>2016-09-01 15:39:56 +0200
committerTim Graham <timograham@gmail.com>2016-09-01 14:06:59 -0400
commit51e5ca4462064ac8869e9b3bf76890eb6ae77c98 (patch)
treed6bf60291f2df5aa2ad3b0e862bdff0320f2d01d /tests/check_framework
parent0a81f540c9ad94301bbdf615a216ee8bffbceac7 (diff)
[1.10.x] Clarified URL regex check message with respect to include().
Backport of 7ed8b98f42cd3a9fa530bbb764d3d79230e0a7a7 from master
Diffstat (limited to 'tests/check_framework')
-rw-r--r--tests/check_framework/test_urls.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/check_framework/test_urls.py b/tests/check_framework/test_urls.py
index 786d040493..926d1947dd 100644
--- a/tests/check_framework/test_urls.py
+++ b/tests/check_framework/test_urls.py
@@ -46,7 +46,13 @@ class CheckUrlsTest(SimpleTestCase):
self.assertEqual(len(result), 1)
warning = result[0]
self.assertEqual(warning.id, 'urls.W002')
- expected_msg = "Your URL pattern '/starting-with-slash/$' has a regex beginning with a '/'"
+ expected_msg = (
+ "Your URL pattern '/starting-with-slash/$' has a regex beginning "
+ "with a '/'. Remove this slash as it is unnecessary. If this "
+ "pattern is targeted in an include(), ensure the include() pattern "
+ "has a trailing '/'."
+ )
+
self.assertIn(expected_msg, warning.msg)
@override_settings(ROOT_URLCONF='check_framework.urls.name_with_colon')