diff options
author | Nick Pope <nick@nickpope.me.uk> | 2022-02-22 09:29:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 10:29:38 +0100 |
commit | 847f46e9bf88964484c8b76a10af753ea1018311 (patch) | |
tree | 13aced534cbae373f47cce8fce1444ad0e8e01d3 /tests/custom_columns | |
parent | 7ba6ebe9149ae38257d70100e8bfbfd0da189862 (diff) | |
download | django-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/custom_columns')
-rw-r--r-- | tests/custom_columns/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/custom_columns/tests.py b/tests/custom_columns/tests.py index 32a48b4840..c6b775a3ef 100644 --- a/tests/custom_columns/tests.py +++ b/tests/custom_columns/tests.py @@ -82,7 +82,7 @@ class CustomColumnsTests(TestCase): def test_author_querying(self): self.assertSequenceEqual( - Author.objects.all().order_by("last_name"), + Author.objects.order_by("last_name"), [self.a2, self.a1], ) @@ -119,7 +119,7 @@ class CustomColumnsTests(TestCase): def test_m2m_table(self): self.assertSequenceEqual( - self.article.authors.all().order_by("last_name"), + self.article.authors.order_by("last_name"), [self.a2, self.a1], ) self.assertSequenceEqual(self.a1.article_set.all(), [self.article]) |