Skip to content

Commit f709670

Browse files
committed
Add test
1 parent 7aff17e commit f709670

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
- case: view_decorator
2+
main: |
3+
from django.http.request import HttpRequest
4+
from django.http.response import HttpResponse
5+
from django.views.decorators.csrf import csrf_protect
6+
7+
@csrf_protect
8+
def good_view(request: HttpRequest) -> HttpResponse:
9+
return HttpResponse()
10+
11+
@csrf_protect
12+
def bad_view(request: int) -> str:
13+
return ""
14+
out: |
15+
main:9: error: Value of type variable "_ViewFuncT" of "csrf_protect" cannot be "Callable[[int], str]" [type-var]

0 commit comments

Comments
 (0)