#NEWLINE# def test_with_json_response( self ) : #NEWLINE# #INDENT# @ as_json #NEWLINE# def view( ) : #NEWLINE# #INDENT# return json_response ( val = 12 ) #NEWLINE# #UNINDENT# r = view ( ) #NEWLINE# assert_equals ( view . status_code , 200 ) #NEWLINE# assert_equals ( r . headers . get ( 'Content-Type' ) , 'application/json' ) #NEWLINE# assert_dict_equal ( r . json , { #NEWLINE# #INDENT# 'status' : 200 , #NEWLINE# 'val' : 12 , #NEWLINE# #UNINDENT# } )