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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user