#NEWLINE# def test_sort_service_dicts_4( self ) : #NEWLINE# #INDENT# services = [ { #NEWLINE# #INDENT# 'name' : 'child' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : 'parent' , #NEWLINE# 'volumes_from' : [ VolumeFromSpec ( 'child' , 'rw' , 'service' ) ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'links' : [ 'parent' ] , #NEWLINE# 'name' : 'grandparent' , #NEWLINE# #UNINDENT# } ] #NEWLINE# sorted_services = sort_service_dicts ( services ) #NEWLINE# assert ( len ( services ) == 3 ) #NEWLINE# assert ( sorted_services [ 0 ] [ 'name' ] == 'child' ) #NEWLINE# assert ( sorted_services [ 1 ] [ 'name' ] == 'parent' ) #NEWLINE# assert ( sorted_services [ 2 ] [ 'name' ] == 'grandparent' )