#NEWLINE# def test_json_encode( ) : #NEWLINE# #INDENT# real_json = FU . json #NEWLINE# FU . json = mock . Mock ( ) #NEWLINE# FU . json . dumps = mock . Mock ( ) #NEWLINE# in_data = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# 'ham' : 9000 , #NEWLINE# #UNINDENT# } #NEWLINE# FU . json_encode ( in_data ) #NEWLINE# ( yield ( NT . assert_equal , [ ( ( in_data , ) , dict ( cls = FU . TolerantJSONEncoder ) ) ] , FU . json . dumps . call_args_list ) ) #NEWLINE# FU . json = real_json