Loading AUTHORS +1 −0 Original line number Diff line number Diff line Loading @@ -594,6 +594,7 @@ answer newbie questions, and generally made Django that much better: I.S. van Oostveen <v.oostveen@idca.nl> viestards.lists@gmail.com George Vilches <gav@thataddress.com> Simeon Visser <http://simeonvisser.com> Vlado <vlado@labath.org> Zachary Voase <zacharyvoase@gmail.com> Marijn Vriens <marijn@metronomo.cl> Loading tests/prefetch_related/tests.py +10 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,16 @@ class PrefetchRelatedTests(TestCase): qs = Book.objects.prefetch_related('first_time_authors') [b.first_time_authors.exists() for b in qs] def test_in_and_prefetch_related(self): """ Regression test for #20242 - QuerySet "in" didn't work the first time when using prefetch_related. This was fixed by the removal of chunked reads from QuerySet iteration in 70679243d1786e03557c28929f9762a119e3ac14. """ qs = Book.objects.prefetch_related('first_time_authors') self.assertTrue(qs[0] in qs) def test_clear(self): """ Test that we can clear the behavior by calling prefetch_related() Loading Loading
AUTHORS +1 −0 Original line number Diff line number Diff line Loading @@ -594,6 +594,7 @@ answer newbie questions, and generally made Django that much better: I.S. van Oostveen <v.oostveen@idca.nl> viestards.lists@gmail.com George Vilches <gav@thataddress.com> Simeon Visser <http://simeonvisser.com> Vlado <vlado@labath.org> Zachary Voase <zacharyvoase@gmail.com> Marijn Vriens <marijn@metronomo.cl> Loading
tests/prefetch_related/tests.py +10 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,16 @@ class PrefetchRelatedTests(TestCase): qs = Book.objects.prefetch_related('first_time_authors') [b.first_time_authors.exists() for b in qs] def test_in_and_prefetch_related(self): """ Regression test for #20242 - QuerySet "in" didn't work the first time when using prefetch_related. This was fixed by the removal of chunked reads from QuerySet iteration in 70679243d1786e03557c28929f9762a119e3ac14. """ qs = Book.objects.prefetch_related('first_time_authors') self.assertTrue(qs[0] in qs) def test_clear(self): """ Test that we can clear the behavior by calling prefetch_related() Loading