summaryrefslogtreecommitdiff
path: root/tests/view_tests
diff options
context:
space:
mode:
authorchriscauley <chris@lablackey.com>2014-04-14 14:12:44 -0400
committerTim Graham <timograham@gmail.com>2014-04-16 20:36:29 -0400
commit66ec9ee441618894c1ccebdcdd5eb4d7fbf4a6d3 (patch)
tree956a7d4f6e3b1c348505a3f2d23c7813c6c362b8 /tests/view_tests
parent030dd4f72ca4d84c0a5e09ee625123d03651fdd1 (diff)
Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
Diffstat (limited to 'tests/view_tests')
-rw-r--r--tests/view_tests/tests/test_debug.py2
-rw-r--r--tests/view_tests/urls.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 75cc8a0b97..8b56cb583b 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -94,7 +94,7 @@ class DebugViewTests(TestCase):
match = re.search(b'<div class="context" id="(?P<id>[^"]+)">', response.content)
self.assertFalse(match is None)
id_repr = match.group('id')
- self.assertFalse(re.search(b'[^c\d]', id_repr),
+ self.assertFalse(re.search(b'[^c0-9]', id_repr),
"Numeric IDs in debug response HTML page shouldn't be localized (value: %s)." % id_repr)
def test_template_exceptions(self):
diff --git a/tests/view_tests/urls.py b/tests/view_tests/urls.py
index cefab5af25..cd7e46663c 100644
--- a/tests/view_tests/urls.py
+++ b/tests/view_tests/urls.py
@@ -72,8 +72,8 @@ urlpatterns = [
]
urlpatterns += [
- url(r'view_exception/(?P<n>\d+)/$', views.view_exception, name='view_exception'),
- url(r'template_exception/(?P<n>\d+)/$', views.template_exception, name='template_exception'),
+ url(r'view_exception/(?P<n>[0-9]+)/$', views.view_exception, name='view_exception'),
+ url(r'template_exception/(?P<n>[0-9]+)/$', views.template_exception, name='template_exception'),
url(r'^raises_template_does_not_exist/(?P<path>.+)$', views.raises_template_does_not_exist, name='raises_template_does_not_exist'),
url(r'^render_no_template/$', views.render_no_template, name='render_no_template'),
]