1
0
mirror of https://github.com/django/django.git synced 2025-03-31 11:37:06 +00:00

Refs #23266 -- Fixed ticket number reference in a queries test.

This commit is contained in:
Tim Graham 2015-08-17 17:36:08 -04:00
parent 982b79b8d8
commit 75b5de8d5f

View File

@ -3515,7 +3515,8 @@ class RelatedLookupTypeTests(TestCase):
# parent objects
self.assertQuerysetEqual(ObjectC.objects.exclude(childobjecta=self.oa), out_c)
# Test for #23226
# QuerySet related object type checking shouldn't issue queries
# (the querysets aren't evaluated here, hence zero queries) (#23266).
with self.assertNumQueries(0):
ObjectB.objects.filter(objecta__in=ObjectA.objects.all())