Removed unnecessary lines in test_has_view_or_change_permission_required().
AutocompleteJsonViewTests.user is already a staff member.
This commit is contained in:
parent
0df5c8187a
commit
a6a94fb966
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue