summaryrefslogtreecommitdiff
path: root/tests/model_inheritance
diff options
context:
space:
mode:
authorza <za@python.or.id>2016-10-27 14:53:39 +0700
committerTim Graham <timograham@gmail.com>2016-11-10 21:30:21 -0500
commit321e94fa41b121f65c02119c02098df327bbd569 (patch)
treece5476c191d589aca4b124f841dfbccac8dd299f /tests/model_inheritance
parent4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff)
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
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()