diff options
| author | Mads Jensen <mje@inducks.org> | 2016-09-10 11:36:27 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-09-13 10:07:37 -0400 |
| commit | 0c1f71635f8a3f32195e1573fe929c7d88a78511 (patch) | |
| tree | 4d8127fde3634dfd3d4ad8451cee140d34070821 /tests/m2m_through | |
| parent | 8b050cf9dcad3db39cc9ef44906bfc39f5aa3d25 (diff) | |
Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with assertSequenceEqual().
Diffstat (limited to 'tests/m2m_through')
| -rw-r--r-- | tests/m2m_through/tests.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/m2m_through/tests.py b/tests/m2m_through/tests.py index 910785ba19..4b995e02b3 100644 --- a/tests/m2m_through/tests.py +++ b/tests/m2m_through/tests.py @@ -204,13 +204,13 @@ class M2mThroughTests(TestCase): CustomMembership.objects.create(person=self.bob, group=self.rock) CustomMembership.objects.create(person=self.jane, group=self.roll) CustomMembership.objects.create(person=self.jim, group=self.roll) - self.assertQuerysetEqual( + self.assertSequenceEqual( self.rock.custom_members.order_by('custom_person_related_name'), - [self.jim, self.bob], lambda x: x + [self.jim, self.bob] ) - self.assertQuerysetEqual( + self.assertSequenceEqual( self.roll.custom_members.order_by('custom_person_related_name'), - [self.jane, self.jim], lambda x: x + [self.jane, self.jim] ) def test_query_first_model_by_intermediate_model_attribute(self): @@ -460,10 +460,7 @@ class M2mThroughToFieldsTests(TestCase): def test_retrieval(self): # Forward retrieval - self.assertQuerysetEqual( - self.curry.ingredients.all(), - [self.pea, self.potato, self.tomato], lambda x: x - ) + self.assertSequenceEqual(self.curry.ingredients.all(), [self.pea, self.potato, self.tomato]) # Backward retrieval self.assertEqual(self.tomato.recipes.get(), self.curry) |
