summaryrefslogtreecommitdiff
path: root/tests/check_framework/urls/cbv_as_view.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check_framework/urls/cbv_as_view.py')
-rw-r--r--tests/check_framework/urls/cbv_as_view.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/check_framework/urls/cbv_as_view.py b/tests/check_framework/urls/cbv_as_view.py
new file mode 100644
index 0000000000..932a2bfcc9
--- /dev/null
+++ b/tests/check_framework/urls/cbv_as_view.py
@@ -0,0 +1,19 @@
+from django.http import HttpResponse
+from django.urls import path
+from django.views import View
+
+
+class EmptyCBV(View):
+ pass
+
+
+class EmptyCallableView:
+ def __call__(self, request, *args, **kwargs):
+ return HttpResponse()
+
+
+urlpatterns = [
+ path('missing_as_view', EmptyCBV),
+ path('has_as_view', EmptyCBV.as_view()),
+ path('callable_class', EmptyCallableView()),
+]