diff options
Diffstat (limited to 'tests/contenttypes_tests')
| -rw-r--r-- | tests/contenttypes_tests/test_fields.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/contenttypes_tests/test_fields.py b/tests/contenttypes_tests/test_fields.py index fc49d59b27..764b9fa7db 100644 --- a/tests/contenttypes_tests/test_fields.py +++ b/tests/contenttypes_tests/test_fields.py @@ -5,7 +5,6 @@ from django.contrib.contenttypes.prefetch import GenericPrefetch from django.db import models from django.test import TestCase from django.test.utils import isolate_apps -from django.utils.deprecation import RemovedInDjango60Warning from .models import Answer, Post, Question @@ -99,29 +98,6 @@ class DeferredGenericRelationTests(TestCase): obj.question -class GetPrefetchQuerySetDeprecation(TestCase): - def test_generic_relation_warning(self): - Question.objects.create(text="test") - questions = Question.objects.all() - msg = ( - "get_prefetch_queryset() is deprecated. Use get_prefetch_querysets() " - "instead." - ) - with self.assertWarnsMessage(RemovedInDjango60Warning, msg) as ctx: - questions[0].answer_set.get_prefetch_queryset(questions) - self.assertEqual(ctx.filename, __file__) - - def test_generic_foreign_key_warning(self): - answers = Answer.objects.all() - msg = ( - "get_prefetch_queryset() is deprecated. Use get_prefetch_querysets() " - "instead." - ) - with self.assertWarnsMessage(RemovedInDjango60Warning, msg) as ctx: - Answer.question.get_prefetch_queryset(answers) - self.assertEqual(ctx.filename, __file__) - - class GetPrefetchQuerySetsTests(TestCase): def test_duplicate_querysets(self): question = Question.objects.create(text="What is your name?") |
