#NEWLINE# def test_has_permission_private_irrelevant_scope_forbidden( self ) : #NEWLINE# #INDENT# component_admin = AuthUserFactory ( ) #NEWLINE# component = ProjectFactory ( creator = component_admin , is_public = False , parent = self . node ) #NEWLINE# cas_resp = cas . CasResponse ( authenticated = True , status = None , user = self . user . _id , attributes = { #NEWLINE# #INDENT# 'accessTokenScope' : { 'osf.users.all_read' } , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_false ( component . has_permission ( self . user , 'write' ) ) #NEWLINE# with assert_raises ( HTTPError ) as exc_info : #NEWLINE# #INDENT# views . check_access ( component , Auth ( user = component . user ) , 'download' , cas_resp ) #NEWLINE# #UNINDENT# assert_equal ( exc_info . exception . code , 403 )