summaryrefslogtreecommitdiff
path: root/tests/get_earliest_or_latest
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2022-02-22 09:29:38 +0000
committerGitHub <noreply@github.com>2022-02-22 10:29:38 +0100
commit847f46e9bf88964484c8b76a10af753ea1018311 (patch)
tree13aced534cbae373f47cce8fce1444ad0e8e01d3 /tests/get_earliest_or_latest
parent7ba6ebe9149ae38257d70100e8bfbfd0da189862 (diff)
downloaddjango-847f46e9bf88964484c8b76a10af753ea1018311.tar.gz
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.
Diffstat (limited to 'tests/get_earliest_or_latest')
-rw-r--r--tests/get_earliest_or_latest/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/get_earliest_or_latest/tests.py b/tests/get_earliest_or_latest/tests.py
index 59ee21aef7..cd63adb75d 100644
--- a/tests/get_earliest_or_latest/tests.py
+++ b/tests/get_earliest_or_latest/tests.py
@@ -232,9 +232,9 @@ class TestFirstLast(TestCase):
with self.assertRaises(IndexError):
IndexErrorArticle.objects.all()[:10:2]
with self.assertRaises(IndexError):
- IndexErrorArticle.objects.all().first()
+ IndexErrorArticle.objects.first()
with self.assertRaises(IndexError):
- IndexErrorArticle.objects.all().last()
+ IndexErrorArticle.objects.last()
check()