summaryrefslogtreecommitdiff
path: root/tests/check_framework/test_urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check_framework/test_urls.py')
-rw-r--r--tests/check_framework/test_urls.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/check_framework/test_urls.py b/tests/check_framework/test_urls.py
index 2ef3d5b07f..663c7a299c 100644
--- a/tests/check_framework/test_urls.py
+++ b/tests/check_framework/test_urls.py
@@ -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):