From 7655cd8eac4d745d791feb4349bbbcf69e892948 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 21 Dec 2010 14:56:48 +0000 Subject: Fixed #13743 -- Fixed CommentsAdmin to not blow up if the delete_selected action is disabled. Thanks, Daniel Lindsley. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14996 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../comment_tests/tests/moderation_view_tests.py | 11 +++++++++++ tests/regressiontests/comment_tests/urls_admin.py | 6 ++++++ 2 files changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/comment_tests/tests/moderation_view_tests.py b/tests/regressiontests/comment_tests/tests/moderation_view_tests.py index ef79b4dc15..e5094ab0cc 100644 --- a/tests/regressiontests/comment_tests/tests/moderation_view_tests.py +++ b/tests/regressiontests/comment_tests/tests/moderation_view_tests.py @@ -190,3 +190,14 @@ class AdminActionsTests(CommentTestCase): self.client.login(username="normaluser", password="normaluser") response = self.client.get("/admin/comments/comment/") self.assertEquals("approve_comments" in response.content, True) + + def testActionsDisabledDelete(self): + "Tests a CommentAdmin where 'delete_selected' has been disabled." + comments = self.createSomeComments() + self.client.login(username="normaluser", password="normaluser") + response = self.client.get('/admin2/comments/comment/') + self.assertEqual(response.status_code, 200) + self.assert_( + '