mirror of
https://github.com/django/django.git
synced 2025-10-22 00:02:23 +00:00
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
This commit is contained in:
parent
4bb70cbcc6
commit
321e94fa41
185 changed files with 1216 additions and 1528 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue