Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with assertSequenceEqual().

This commit is contained in:
Mads Jensen 2016-09-10 11:36:27 +02:00 committed by Tim Graham
parent 8b050cf9dc
commit 0c1f71635f
23 changed files with 262 additions and 504 deletions

View file

@ -487,15 +487,9 @@ class ModelInheritanceTest(TestCase):
)
s = Supplier.objects.create(restaurant=r)
with self.assertNumQueries(1):
self.assertQuerysetEqual(
Supplier.objects.filter(restaurant=r),
[s], lambda x: x,
)
self.assertSequenceEqual(Supplier.objects.filter(restaurant=r), [s])
with self.assertNumQueries(1):
self.assertQuerysetEqual(
r.supplier_set.all(),
[s], lambda x: x,
)
self.assertSequenceEqual(r.supplier_set.all(), [s])
def test_queries_on_parent_access(self):
italian_restaurant = ItalianRestaurant.objects.create(