mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Removed redundant QuerySet.all() calls in docs and tests.
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
This commit is contained in:
@@ -110,7 +110,7 @@ class QuerySetSetOperationTests(TestCase):
|
||||
self.assertEqual(len(qs3.union(qs3)), 0)
|
||||
|
||||
def test_empty_qs_union_with_ordered_qs(self):
|
||||
qs1 = Number.objects.all().order_by("num")
|
||||
qs1 = Number.objects.order_by("num")
|
||||
qs2 = Number.objects.none().union(qs1).order_by("num")
|
||||
self.assertEqual(list(qs1), list(qs2))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user