diff options
Diffstat (limited to 'tests/m2m_through/tests.py')
-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) |