Skip to content

Commit 5eff75c

Browse files
committed
Add failing test
1 parent 61b1035 commit 5eff75c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/typecheck/test_exceptions.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@
1515
status_code = 200
1616
default_detail = {"ok": "everything"}
1717
default_code = "ok"
18+
- case: test_exception_declaration_lazystr
19+
main: |
20+
from django.utils.translation import gettext_lazy as _
21+
from rest_framework import exceptions
22+
23+
class MyException(exceptions.APIException):
24+
status_code = 200
25+
default_detail = _("Está tudo bem")
26+
default_code = "ok"

0 commit comments

Comments
 (0)