#NEWLINE# def test_has_permission_decommissioned_scope_no_error( 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' : { 'decommissioned.scope+write' , 'osf.nodes.data_read' } , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_false ( component . has_permission ( self . user , 'write' ) ) #NEWLINE# res = views . check_access ( component , Auth ( user = self . user ) , 'download' , component ) #NEWLINE# assert_true ( res )