mirror of
https://github.com/django/django.git
synced 2025-08-18 17:50:58 +00:00
Fixed #32195 -- Added system check for invalid view in path() and improved error messages.
This commit is contained in:
parent
8f89454bbc
commit
3e73c65ffc
6 changed files with 65 additions and 0 deletions
|
@ -134,6 +134,16 @@ class CheckUrlConfigTests(SimpleTestCase):
|
|||
result = check_url_namespaces_unique(None)
|
||||
self.assertEqual(result, [])
|
||||
|
||||
@override_settings(ROOT_URLCONF='check_framework.urls.cbv_as_view')
|
||||
def test_check_view_not_class(self):
|
||||
self.assertEqual(check_url_config(None), [
|
||||
Error(
|
||||
"Your URL pattern 'missing_as_view' has an invalid view, pass "
|
||||
"EmptyCBV.as_view() instead of EmptyCBV.",
|
||||
id='urls.E009',
|
||||
),
|
||||
])
|
||||
|
||||
|
||||
class UpdatedToPathTests(SimpleTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue