1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.

This commit is contained in:
Jon Dufresne
2017-06-01 16:08:59 -07:00
committed by Tim Graham
parent edee5a8de6
commit 2c69824e5a
63 changed files with 145 additions and 150 deletions

View File

@@ -40,7 +40,7 @@ class MultiTableTests(TestCase):
result = Event.objects.filter(name='Exposition Match').prefetch_related('special_people')
with self.assertNumQueries(2):
self.assertCountEqual(result, [self.event])
self.assertEqual(sorted([p.name for p in result[0].special_people.all()]), ['Chris', 'Dan'])
self.assertEqual(sorted(p.name for p in result[0].special_people.all()), ['Chris', 'Dan'])
def test_m2m_prefetch_reverse_proxied(self):
result = Person.objects.filter(name='Dan').prefetch_related('special_event_set')