diff options
Diffstat (limited to 'tests/urlpatterns')
| -rw-r--r-- | tests/urlpatterns/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/urlpatterns/tests.py b/tests/urlpatterns/tests.py index 3c41104506..92c4e6399e 100644 --- a/tests/urlpatterns/tests.py +++ b/tests/urlpatterns/tests.py @@ -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): |
