mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +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:
parent
7ba6ebe914
commit
847f46e9bf
47 changed files with 184 additions and 209 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue