summaryrefslogtreecommitdiff
path: root/tests/model_inheritance
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_inheritance')
-rw-r--r--tests/model_inheritance/tests.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/model_inheritance/tests.py b/tests/model_inheritance/tests.py
index 657e8fa297..079fbb75c4 100644
--- a/tests/model_inheritance/tests.py
+++ b/tests/model_inheritance/tests.py
@@ -109,9 +109,8 @@ class ModelInheritanceTests(TestCase):
def test_update_parent_filtering(self):
"""
- Test that updating a field of a model subclass doesn't issue an UPDATE
- query constrained by an inner query.
- Refs #10399
+ Updating a field of a model subclass doesn't issue an UPDATE
+ query constrained by an inner query (#10399).
"""
supplier = Supplier.objects.create(
name='Central market',
@@ -336,12 +335,12 @@ class ModelInheritanceDataTests(TestCase):
qs = (Restaurant.objects.select_related("italianrestaurant")
.defer("italianrestaurant__serves_gnocchi").order_by("rating"))
- # Test that the field was actually deferred
+ # The field was actually deferred
with self.assertNumQueries(2):
objs = list(qs.all())
self.assertTrue(objs[1].italianrestaurant.serves_gnocchi)
- # Test that model fields where assigned correct values
+ # Model fields where assigned correct values
self.assertEqual(qs[0].name, 'Demon Dogs')
self.assertEqual(qs[0].rating, 2)
self.assertEqual(qs[1].italianrestaurant.name, 'Ristorante Miron')
@@ -349,8 +348,7 @@ class ModelInheritanceDataTests(TestCase):
def test_update_query_counts(self):
"""
- Test that update queries do not generate non-necessary queries.
- Refs #18304.
+ Update queries do not generate unnecessary queries (#18304).
"""
with self.assertNumQueries(3):
self.italian_restaurant.save()