#NEWLINE# def test_uploadFile_given_dictionary( ) : #NEWLINE# #INDENT# folder = { #NEWLINE# #INDENT# 'concreteType' : Folder . _synapse_entity_type , #NEWLINE# 'parentId' : project [ 'id' ] , #NEWLINE# 'name' : 'fooDictionary' , #NEWLINE# 'foo' : 334455 , #NEWLINE# #UNINDENT# } #NEWLINE# entity = syn . store ( folder ) #NEWLINE# entity = syn . get ( entity ) #NEWLINE# assert ( entity . parentId == project . id ) #NEWLINE# assert ( entity . foo [ 0 ] == 334455 ) #NEWLINE# path = utils . make_bogus_data_file ( ) #NEWLINE# schedule_for_cleanup ( path ) #NEWLINE# rareCase = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# rareCase . update ( entity . annotations ) #NEWLINE# rareCase . update ( entity . properties ) #NEWLINE# rareCase . update ( entity . local_state ( ) ) #NEWLINE# rareCase [ 'description' ] = 'Updating with a plain dictionary should be rare.' #NEWLINE# entity = syn . store ( rareCase ) #NEWLINE# assert ( entity . description == rareCase [ 'description' ] ) #NEWLINE# assert ( rareCase . name == 'fooDictionary' ) #NEWLINE# entity = syn . get ( entity [ 'id' ] )