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.
|
autocomplete view for it.
|
||||||
"""
|
"""
|
||||||
request = self.factory.get(self.url, {'term': 'is', **self.opts})
|
request = self.factory.get(self.url, {'term': 'is', **self.opts})
|
||||||
self.user.is_staff = True
|
|
||||||
self.user.save()
|
|
||||||
request.user = self.user
|
request.user = self.user
|
||||||
with self.assertRaises(PermissionDenied):
|
with self.assertRaises(PermissionDenied):
|
||||||
AutocompleteJsonView.as_view(**self.as_view_args)(request)
|
AutocompleteJsonView.as_view(**self.as_view_args)(request)
|
||||||
|
|
Loading…
Reference in New Issue