mirror of
https://github.com/django/django.git
synced 2025-07-19 03:05:32 +00:00
Fixed #29667 -- Prohibited whitespaces in path() URLs.
This commit is contained in:
parent
cece802dbb
commit
22394bd3a1
2 changed files with 8 additions and 0 deletions
|
@ -130,6 +130,11 @@ class SimplifiedURLTests(SimpleTestCase):
|
|||
with self.assertRaisesMessage(ImproperlyConfigured, msg):
|
||||
path('foo/<nonexistent:var>/', empty_view)
|
||||
|
||||
def test_space_in_route(self):
|
||||
msg = "URL route 'space/<int: num>' cannot contain whitespace."
|
||||
with self.assertRaisesMessage(ImproperlyConfigured, msg):
|
||||
path('space/<int: num>', empty_view)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='urlpatterns.converter_urls')
|
||||
class ConverterTests(SimpleTestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue