#NEWLINE# def test_walk( self ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# 'bam' : { #NEWLINE# #INDENT# 'foo' : 'bar2' , #NEWLINE# 'foo2' : [ 'bar3' , 'bar4' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# actual = [ ] #NEWLINE# callback = ( lambda item , key , node : actual . append ( item ) ) #NEWLINE# utils . walk ( data , callback ) #NEWLINE# expected = [ 'bar' , 'bar2' , 'bar3' , 'bar4' ] #NEWLINE# self . assertItemsEqual ( expected , actual )