From 5615274262e564e3a9ebd85fbf5a5ac2de9e8432 Mon Sep 17 00:00:00 2001 From: Christian Bundy <537700+christianbundy@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:12:07 -0700 Subject: [PATCH] Fix test broken by django-stubs 4.2.4 (#471) --- tests/typecheck/test_views.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/typecheck/test_views.yml b/tests/typecheck/test_views.yml index 6d6cae1fa..1bb33d151 100644 --- a/tests/typecheck/test_views.yml +++ b/tests/typecheck/test_views.yml @@ -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: |