From 847f46e9bf88964484c8b76a10af753ea1018311 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Tue, 22 Feb 2022 09:29:38 +0000 Subject: 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. --- tests/backends/sqlite/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/backends/sqlite') diff --git a/tests/backends/sqlite/tests.py b/tests/backends/sqlite/tests.py index 97505eaa36..0669d26191 100644 --- a/tests/backends/sqlite/tests.py +++ b/tests/backends/sqlite/tests.py @@ -28,13 +28,13 @@ class Tests(TestCase): """Raise NotSupportedError when aggregating on date/time fields.""" for aggregate in (Sum, Avg, Variance, StdDev): with self.assertRaises(NotSupportedError): - Item.objects.all().aggregate(aggregate("time")) + Item.objects.aggregate(aggregate("time")) with self.assertRaises(NotSupportedError): - Item.objects.all().aggregate(aggregate("date")) + Item.objects.aggregate(aggregate("date")) with self.assertRaises(NotSupportedError): - Item.objects.all().aggregate(aggregate("last_modified")) + Item.objects.aggregate(aggregate("last_modified")) with self.assertRaises(NotSupportedError): - Item.objects.all().aggregate( + Item.objects.aggregate( **{ "complex": aggregate("last_modified") + aggregate("last_modified") -- cgit v1.3