Python: Add test with unkown view class in django

This commit is contained in:
Rasmus Wriedt Larsen
2021-02-10 15:55:54 +01:00
parent 42eceb80bd
commit 78a3206fce

View File

@@ -140,3 +140,13 @@ def with_decorator(request, foo): # $ requestHandler routedParameter=foo
urlpatterns = [
path("with_decorator/<foo>", with_decorator), # $ routeSetup="with_decorator/<foo>"
]
class UnknownViewSubclass(UnknownViewSuperclass):
# Although we don't know for certain that this class is a django view class, the fact that it's
# used with `as_view()` in the routing setup should be enough that we treat it as such.
def get(self, request): # $ MISSING: requestHandler
pass
urlpatterns = [
path("UnknownViewSubclass/", UnknownViewSubclass.as_view()), # $ routeSetup="UnknownViewSubclass/"
]