From db5049c9f7c6347e4d7866599877beb9e8e78f60 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 2 Feb 2013 10:42:01 +0100 Subject: [PATCH] Fixed the test introduced in 2ca37af6 under Python 3. --- tests/regressiontests/generic_relations_regress/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regressiontests/generic_relations_regress/tests.py b/tests/regressiontests/generic_relations_regress/tests.py index 7690fd560a..9aa3268fe2 100644 --- a/tests/regressiontests/generic_relations_regress/tests.py +++ b/tests/regressiontests/generic_relations_regress/tests.py @@ -93,7 +93,7 @@ class GenericRelationTests(TestCase): places = list(Place.objects.order_by('links__id')) def count_places(place): - return len(filter(lambda p: p.id == place.id, places)) + return len([p for p in places if p.id == place.id]) self.assertEqual(len(places), 2) self.assertEqual(count_places(p1), 1)