mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #33651 -- Removed Prefetch.get_current_queryset() and get_prefetch_queryset() per deprecation timeline.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from django.db import IntegrityError, connection, transaction
|
||||
from django.test import TestCase
|
||||
from django.utils.deprecation import RemovedInDjango60Warning
|
||||
|
||||
from .models import (
|
||||
Bar,
|
||||
@@ -606,16 +605,6 @@ class OneToOneTests(TestCase):
|
||||
self.b1.save()
|
||||
self.assertEqual(self.b1.place, self.p2)
|
||||
|
||||
def test_get_prefetch_queryset_warning(self):
|
||||
places = Place.objects.all()
|
||||
msg = (
|
||||
"get_prefetch_queryset() is deprecated. Use get_prefetch_querysets() "
|
||||
"instead."
|
||||
)
|
||||
with self.assertWarnsMessage(RemovedInDjango60Warning, msg) as ctx:
|
||||
Place.bar.get_prefetch_queryset(places)
|
||||
self.assertEqual(ctx.filename, __file__)
|
||||
|
||||
def test_get_prefetch_querysets_invalid_querysets_length(self):
|
||||
places = Place.objects.all()
|
||||
msg = (
|
||||
|
||||
Reference in New Issue
Block a user