summaryrefslogtreecommitdiff
path: root/tests/admin_views/test_actions.py
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2018-06-18 21:07:29 +0200
committerTim Graham <timograham@gmail.com>2018-06-18 15:37:05 -0400
commit306f1f8ea3e2b54e194a59ac0ecb686460f180e8 (patch)
treed3291701cf8c292248d6c074f656575de333de14 /tests/admin_views/test_actions.py
parentd2ca28db54a5871d851cdd9184f4cf0d31aff946 (diff)
[2.1.x] Fixed #29419 -- Allowed permissioning of admin actions.
Backport of 958c7b301ead79974db8edd5b9c6588a10a28ae7 from master
Diffstat (limited to 'tests/admin_views/test_actions.py')
-rw-r--r--tests/admin_views/test_actions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/admin_views/test_actions.py b/tests/admin_views/test_actions.py
index 423c2f927f..c0ea30fcf7 100644
--- a/tests/admin_views/test_actions.py
+++ b/tests/admin_views/test_actions.py
@@ -429,8 +429,11 @@ class AdminActionsPermissionTests(TestCase):
ACTION_CHECKBOX_NAME: [self.s1.pk],
'action': 'delete_selected',
}
- response = self.client.post(reverse('admin:admin_views_subscriber_changelist'), action_data)
- self.assertEqual(response.status_code, 403)
+ url = reverse('admin:admin_views_subscriber_changelist')
+ response = self.client.post(url, action_data)
+ self.assertRedirects(response, url, fetch_redirect_response=False)
+ response = self.client.get(response.url)
+ self.assertContains(response, 'No action selected.')
def test_model_admin_no_delete_permission_externalsubscriber(self):
"""