summaryrefslogtreecommitdiff
path: root/tests/backends/sqlite
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/backends/sqlite
parent7ba6ebe9149ae38257d70100e8bfbfd0da189862 (diff)
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/backends/sqlite')
-rw-r--r--tests/backends/sqlite/tests.py8
1 files changed, 4 insertions, 4 deletions
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")