summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2010-03-20 15:23:10 +0000
committerKaren Tracey <kmtracey@gmail.com>2010-03-20 15:23:10 +0000
commiteb1c7b033ddac99b333407ba0b964831aa5ef9c4 (patch)
treecb16cffa7a70c6cdbac46c9f1f7b15c887389f05 /tests
parent32134986812442347a72186c2b552fd1b29f2494 (diff)
[1.1.X] Fixed #12707. Admin action messages are no longer displayed when submitting list_editable content. Thanks, copelco.
and Fixed #12962: Made admin delete action work again. Thanks ptone, skevy, mlavin and anyone else I've missed. r12525 and r12813 from trunk, together to avoid the regression introduced by r12525 alone. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/admin_views/tests.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
index 756cb18f4d..129f93cdac 100644
--- a/tests/regressiontests/admin_views/tests.py
+++ b/tests/regressiontests/admin_views/tests.py
@@ -1025,6 +1025,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",
@@ -1265,7 +1287,6 @@ class AdminActionsTest(TestCase):
delete_confirmation_data = {
ACTION_CHECKBOX_NAME: [1, 2],
'action' : 'delete_selected',
- 'index': 0,
'post': 'yes',
}
confirmation = self.client.post('/test_admin/admin/admin_views/subscriber/', action_data)