1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed E128 flake8 warnings in tests/.

This commit is contained in:
Tim Graham
2016-04-07 22:04:45 -04:00
parent df8d8d4292
commit 92053acbb9
148 changed files with 2073 additions and 2248 deletions

View File

@@ -286,12 +286,18 @@ class DeferAnnotateSelectRelatedTest(TestCase):
def test_defer_annotate_select_related(self):
location = Location.objects.create()
Request.objects.create(location=location)
self.assertIsInstance(list(Request.objects
.annotate(Count('items')).select_related('profile', 'location')
.only('profile', 'location')), list)
self.assertIsInstance(list(Request.objects
.annotate(Count('items')).select_related('profile', 'location')
.only('profile__profile1', 'location__location1')), list)
self.assertIsInstance(list(Request.objects
.annotate(Count('items')).select_related('profile', 'location')
.defer('request1', 'request2', 'request3', 'request4')), list)
self.assertIsInstance(
list(Request.objects.annotate(Count('items')).select_related('profile', 'location')
.only('profile', 'location')),
list
)
self.assertIsInstance(
list(Request.objects.annotate(Count('items')).select_related('profile', 'location')
.only('profile__profile1', 'location__location1')),
list
)
self.assertIsInstance(
list(Request.objects.annotate(Count('items')).select_related('profile', 'location')
.defer('request1', 'request2', 'request3', 'request4')),
list
)