1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.

This commit is contained in:
za
2016-10-27 14:53:39 +07:00
committed by Tim Graham
parent 4bb70cbcc6
commit 321e94fa41
185 changed files with 1216 additions and 1528 deletions

View File

@@ -447,7 +447,7 @@ class StateTests(SimpleTestCase):
def test_render_project_dependencies(self):
"""
Tests that the ProjectState render method correctly renders models
The ProjectState render method correctly renders models
to account for inter-model base dependencies.
"""
new_apps = Apps()
@@ -506,7 +506,7 @@ class StateTests(SimpleTestCase):
def test_render_unique_app_labels(self):
"""
Tests that the ProjectState render method doesn't raise an
The ProjectState render method doesn't raise an
ImproperlyConfigured exception about unique labels if two dotted app
names have the same last part.
"""
@@ -557,7 +557,7 @@ class StateTests(SimpleTestCase):
model_a_old = old_state.apps.get_model('something', 'A')
model_b_old = old_state.apps.get_model('something', 'B')
model_c_old = old_state.apps.get_model('something', 'C')
# Check that the relations between the old models are correct
# The relations between the old models are correct
self.assertIs(model_a_old._meta.get_field('b').related_model, model_b_old)
self.assertIs(model_b_old._meta.get_field('a_ptr').related_model, model_a_old)
@@ -571,14 +571,14 @@ class StateTests(SimpleTestCase):
model_b_new = project_state.apps.get_model('something', 'B')
model_c_new = project_state.apps.get_model('something', 'C')
# Check that all models have changed
# All models have changed
self.assertIsNot(model_a_old, model_a_new)
self.assertIsNot(model_b_old, model_b_new)
self.assertIsNot(model_c_old, model_c_new)
# Check that the relations between the old models still hold
# The relations between the old models still hold
self.assertIs(model_a_old._meta.get_field('b').related_model, model_b_old)
self.assertIs(model_b_old._meta.get_field('a_ptr').related_model, model_a_old)
# Check that the relations between the new models correct
# The relations between the new models correct
self.assertIs(model_a_new._meta.get_field('b').related_model, model_b_new)
self.assertIs(model_b_new._meta.get_field('a_ptr').related_model, model_a_new)
self.assertIs(model_a_new._meta.get_field('from_c').related_model, model_c_new)
@@ -586,7 +586,7 @@ class StateTests(SimpleTestCase):
def test_remove_relations(self):
"""
#24225 - Tests that relations between models are updated while
#24225 - Relations between models are updated while
remaining the relations and references for models of an old state.
"""
new_apps = Apps()
@@ -614,7 +614,7 @@ class StateTests(SimpleTestCase):
operation = RemoveField("b", "to_a")
operation.state_forwards("something", project_state)
# Tests that model from old_state still has the relation
# Model from old_state still has the relation
model_a_old = get_model_a(old_state)
model_a_new = get_model_a(project_state)
self.assertIsNot(model_a_old, model_a_new)
@@ -668,7 +668,7 @@ class StateTests(SimpleTestCase):
model_a_new = get_model_a(project_state)
self.assertIsNot(model_a_old, model_a_new)
# Tests that the old model's _meta is still consistent
# The old model's _meta is still consistent
field_to_a_old = model_a_old._meta.get_field("to_a")
self.assertEqual(field_to_a_old.m2m_field_name(), "from_a")
self.assertEqual(field_to_a_old.m2m_reverse_field_name(), "to_a")
@@ -676,7 +676,7 @@ class StateTests(SimpleTestCase):
self.assertIs(field_to_a_old.remote_field.through._meta.get_field('to_a').related_model, model_a_old)
self.assertIs(field_to_a_old.remote_field.through._meta.get_field('from_a').related_model, model_a_old)
# Tests that the new model's _meta is still consistent
# The new model's _meta is still consistent
field_to_a_new = model_a_new._meta.get_field("to_a")
self.assertEqual(field_to_a_new.m2m_field_name(), "from_a")
self.assertEqual(field_to_a_new.m2m_reverse_field_name(), "to_a")
@@ -686,9 +686,8 @@ class StateTests(SimpleTestCase):
def test_equality(self):
"""
Tests that == and != are implemented correctly.
== and != are implemented correctly.
"""
# Test two things that should be equal
project_state = ProjectState()
project_state.add_model(ModelState(
@@ -807,7 +806,7 @@ class StateTests(SimpleTestCase):
def test_real_apps(self):
"""
Tests that including real apps can resolve dangling FK errors.
Including real apps can resolve dangling FK errors.
This test relies on the fact that contenttypes is always loaded.
"""
new_apps = Apps()
@@ -867,7 +866,7 @@ class StateTests(SimpleTestCase):
def test_manager_refer_correct_model_version(self):
"""
#24147 - Tests that managers refer to the correct version of a
#24147 - Managers refer to the correct version of a
historical model
"""
project_state = ProjectState()
@@ -962,7 +961,7 @@ class ModelStateTests(SimpleTestCase):
def test_fields_immutability(self):
"""
Tests that rendering a model state doesn't alter its internal fields.
Rendering a model state doesn't alter its internal fields.
"""
apps = Apps()
field = models.CharField(max_length=1)