diff options
| author | Tim Graham <timograham@gmail.com> | 2016-04-07 22:04:45 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-08 10:12:33 -0400 |
| commit | 92053acbb9160862c3e743a99ed8ccff8d4f8fd6 (patch) | |
| tree | 50e7fd28a650f0e2352cf94f92e5a66d28a81988 /tests/defer_regress | |
| parent | df8d8d4292684d6ffa7474f1e201aed486f02b53 (diff) | |
Fixed E128 flake8 warnings in tests/.
Diffstat (limited to 'tests/defer_regress')
| -rw-r--r-- | tests/defer_regress/tests.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/defer_regress/tests.py b/tests/defer_regress/tests.py index 2594ffcdb8..eb2fb8ecfc 100644 --- a/tests/defer_regress/tests.py +++ b/tests/defer_regress/tests.py @@ -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 + ) |
