Skip to content

Commit

Permalink
Fix test broken by django-stubs 4.2.4 (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbundy authored Oct 4, 2023
1 parent 9d33237 commit 5615274
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/typecheck/test_views.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@
- case: test_destroy_api_view
main: |
from rest_framework import generics
from django.db.models import Model
class MyModel(Model):
pass
from myapp.models import MyModel
class MyView(generics.DestroyAPIView):
queryset = MyModel.objects.all()
def perform_destroy(self, instance: MyModel) -> None: ...
installed_apps:
- myapp
files:
- path: myapp/__init__.py
- path: myapp/models.py
content: |
from django.db import models
class MyModel(models.Model):
pass
- case: test_build_api_request
main: |
Expand Down

0 comments on commit 5615274

Please sign in to comment.