mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +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
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue