mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #12707. Admin action messages are no longer displayed when submitting list_editable content. Thanks, copelco.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -940,6 +940,28 @@ class AdminViewListEditable(TestCase):
|
||||
# 1 select per object = 3 selects
|
||||
self.failUnlessEqual(response.content.count("<select"), 4)
|
||||
|
||||
def test_post_messages(self):
|
||||
# Ticket 12707: Saving inline editable should not show admin
|
||||
# action warnings
|
||||
data = {
|
||||
"form-TOTAL_FORMS": "3",
|
||||
"form-INITIAL_FORMS": "3",
|
||||
"form-MAX_NUM_FORMS": "0",
|
||||
|
||||
"form-0-gender": "1",
|
||||
"form-0-id": "1",
|
||||
|
||||
"form-1-gender": "2",
|
||||
"form-1-id": "2",
|
||||
|
||||
"form-2-alive": "checked",
|
||||
"form-2-gender": "1",
|
||||
"form-2-id": "3",
|
||||
}
|
||||
response = self.client.post('/test_admin/admin/admin_views/person/',
|
||||
data, follow=True)
|
||||
self.assertEqual(len(response.context['messages']), 1)
|
||||
|
||||
def test_post_submission(self):
|
||||
data = {
|
||||
"form-TOTAL_FORMS": "3",
|
||||
|
||||
Reference in New Issue
Block a user