Fixed the test introduced in 2ca37af6 under Python 3.

This commit is contained in:
Aymeric Augustin 2013-02-02 10:42:01 +01:00
parent 2ca37af621
commit db5049c9f7
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class GenericRelationTests(TestCase):
places = list(Place.objects.order_by('links__id')) places = list(Place.objects.order_by('links__id'))
def count_places(place): 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(len(places), 2)
self.assertEqual(count_places(p1), 1) self.assertEqual(count_places(p1), 1)