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

Fixed #27463 -- Fixed E741 flake8 warnings.

This commit is contained in:
Ramin Farajpour Cami
2016-11-15 02:10:28 +03:30
committed by Tim Graham
parent c7bfcd2f37
commit 0a63ef3f61
18 changed files with 90 additions and 83 deletions

View File

@@ -564,14 +564,14 @@ class Queries1Tests(TestCase):
self.assertEqual(d, {'a': 'one', 'b': 'two'})
# Order by the number of tags attached to an item.
l = (
qs = (
Item.objects
.extra(select={
'count': 'select count(*) from queries_item_tags where queries_item_tags.item_id = queries_item.id'
})
.order_by('-count')
)
self.assertEqual([o.count for o in l], [2, 2, 1, 0])
self.assertEqual([o.count for o in qs], [2, 2, 1, 0])
def test_ticket6154(self):
# Multiple filter statements are joined using "AND" all the time.