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/model_inheritance_regress | |
| parent | 7ba6ebe9149ae38257d70100e8bfbfd0da189862 (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/model_inheritance_regress')
| -rw-r--r-- | tests/model_inheritance_regress/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py index d1d007f277..e9288db345 100644 --- a/tests/model_inheritance_regress/tests.py +++ b/tests/model_inheritance_regress/tests.py @@ -260,7 +260,7 @@ class ModelInheritanceTest(TestCase): """ Regression test for #11764 """ - wholesalers = list(Wholesaler.objects.all().select_related()) + wholesalers = list(Wholesaler.objects.select_related()) self.assertEqual(wholesalers, []) def test_issue_7853(self): @@ -525,7 +525,7 @@ class ModelInheritanceTest(TestCase): serves_pizza=True, serves_hot_dogs=True, ) - p = Place.objects.all().select_related("restaurant")[0] + p = Place.objects.select_related("restaurant")[0] self.assertIsInstance(p.restaurant.serves_pizza, bool) def test_inheritance_select_related(self): |
