#NEWLINE# def test_update_dataset( self ) : #NEWLINE# #INDENT# dataset = Config . CLIENT . dataset ( DATASET_NAME ) #NEWLINE# self . assertFalse ( dataset . exists ( ) ) #NEWLINE# dataset . create ( ) #NEWLINE# self . to_delete . append ( dataset ) #NEWLINE# self . assertTrue ( dataset . exists ( ) ) #NEWLINE# after = [ grant for grant in dataset . access_grants if ( grant . entity_id != 'projectWriters' ) ] #NEWLINE# dataset . access_grants = after #NEWLINE# dataset . update ( ) #NEWLINE# self . assertEqual ( len ( dataset . access_grants ) , len ( after ) ) #NEWLINE# for ( found , expected ) in zip ( dataset . access_grants , after ) : #NEWLINE# #INDENT# self . assertEqual ( found . role , expected . role ) #NEWLINE# self . assertEqual ( found . entity_type , expected . entity_type ) #NEWLINE# self . assertEqual ( found . entity_id , expected . entity_id )