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

@ -68,9 +68,6 @@ class AdminCustomUrlsTest(TestCase):
self.assertContains(response, 'Action added through a popup')
def test_admin_URLs_no_clash(self):
"""
Test that some admin URLs work correctly.
"""
# Should get the change_view for model instance with PK 'add', not show
# the add_view
url = reverse('admin_custom_urls:%s_action_change' % Action._meta.app_label, args=(quote('add'),))
@ -89,10 +86,8 @@ class AdminCustomUrlsTest(TestCase):
def test_post_save_add_redirect(self):
"""
Ensures that ModelAdmin.response_post_save_add() controls the
redirection after the 'Save' button has been pressed when adding a
new object.
Refs 8001, 18310, 19505.
ModelAdmin.response_post_save_add() controls the redirection after
the 'Save' button has been pressed when adding a new object.
"""
post_data = {'name': 'John Doe'}
self.assertEqual(Person.objects.count(), 0)
@ -104,10 +99,8 @@ class AdminCustomUrlsTest(TestCase):
def test_post_save_change_redirect(self):
"""
Ensures that ModelAdmin.response_post_save_change() controls the
redirection after the 'Save' button has been pressed when editing an
existing object.
Refs 8001, 18310, 19505.
ModelAdmin.response_post_save_change() controls the redirection after
the 'Save' button has been pressed when editing an existing object.
"""
Person.objects.create(name='John Doe')
self.assertEqual(Person.objects.count(), 1)
@ -118,8 +111,8 @@ class AdminCustomUrlsTest(TestCase):
def test_post_url_continue(self):
"""
Ensures that the ModelAdmin.response_add()'s parameter `post_url_continue`
controls the redirection after an object has been created.
The ModelAdmin.response_add()'s parameter `post_url_continue` controls
the redirection after an object has been created.
"""
post_data = {'name': 'SuperFast', '_continue': '1'}
self.assertEqual(Car.objects.count(), 0)