#NEWLINE# def test_permissioned_denied_redirect( self ) : #NEWLINE# #INDENT# class AView ( PermissionRequiredMixin , EmptyResponseView ) : #NEWLINE# #INDENT# permission_required = [ 'auth_tests.add_customuser' , 'auth_tests.change_customuser' , 'non-existent-permission' ] #NEWLINE# #UNINDENT# request = self . factory . get ( '/rand' ) #NEWLINE# request . user = self . user #NEWLINE# resp = AView . as_view ( ) ( request ) #NEWLINE# self . assertEqual ( resp . status_code , 302 )