mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #32195 -- Added path() test for invalid view.
This commit is contained in:
parent
fcd44b889f
commit
8f89454bbc
@ -141,6 +141,11 @@ class SimplifiedURLTests(SimpleTestCase):
|
||||
with self.assertRaisesMessage(ImproperlyConfigured, msg):
|
||||
path('foo/<nonexistent:var>/', empty_view)
|
||||
|
||||
def test_invalid_view(self):
|
||||
msg = 'view must be a callable or a list/tuple in the case of include().'
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
path('articles/', 'invalid_view')
|
||||
|
||||
def test_whitespace_in_route(self):
|
||||
msg = (
|
||||
"URL route 'space/<int:num>/extra/<str:%stest>' cannot contain "
|
||||
|
Loading…
Reference in New Issue
Block a user