mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #31459 -- Fixed handling invalid indentifiers in URL path conversion.
This patch adjusted existing tests that used invalid identifiers.
This commit is contained in:
committed by
Mariusz Felisiak
parent
578c03b276
commit
4bb33bb074
@@ -143,7 +143,7 @@ class UpdatedToPathTests(SimpleTestCase):
|
||||
self.assertEqual(len(result), 1)
|
||||
warning = result[0]
|
||||
self.assertEqual(warning.id, '2_0.W001')
|
||||
expected_msg = "Your URL pattern '(?P<named-group>\\d+)' has a route"
|
||||
expected_msg = "Your URL pattern '(?P<named_group>\\d+)' has a route"
|
||||
self.assertIn(expected_msg, warning.msg)
|
||||
|
||||
@override_settings(ROOT_URLCONF='check_framework.urls.path_compatibility.beginning_with_caret')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from django.urls import path
|
||||
|
||||
urlpatterns = [
|
||||
path(r'(?P<named-group>\d+)', lambda x: x),
|
||||
path(r'(?P<named_group>\d+)', lambda x: x),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user