Removed unnecessary lines in test_has_view_or_change_permission_required().

AutocompleteJsonViewTests.user is already a staff member.
This commit is contained in:
Mariusz Felisiak 2021-03-10 15:37:28 +01:00 committed by GitHub
parent 0df5c8187a
commit a6a94fb966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -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)