From a6a94fb966cc128a056f63e83213ab4aeee34004 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 10 Mar 2021 15:37:28 +0100 Subject: [PATCH] Removed unnecessary lines in test_has_view_or_change_permission_required(). AutocompleteJsonViewTests.user is already a staff member. --- tests/admin_views/test_autocomplete_view.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/admin_views/test_autocomplete_view.py b/tests/admin_views/test_autocomplete_view.py index 2b154e7a456..1ba8fb146d2 100644 --- a/tests/admin_views/test_autocomplete_view.py +++ b/tests/admin_views/test_autocomplete_view.py @@ -140,8 +140,6 @@ class AutocompleteJsonViewTests(AdminViewBasicTestCase): autocomplete view for it. """ request = self.factory.get(self.url, {'term': 'is', **self.opts}) - self.user.is_staff = True - self.user.save() request.user = self.user with self.assertRaises(PermissionDenied): AutocompleteJsonView.as_view(**self.as_view_args)(request)