#NEWLINE# def test_basic( self ) : #NEWLINE# #INDENT# '\n        Basic test for JSON encoding.\n        ' #NEWLINE# self . setup_test_view ( self . TestDocument ) #NEWLINE# test_obj = self . TestDocument ( username = 'foo' , name = 'bar' ) #NEWLINE# test_obj . save ( ) #NEWLINE# with self . app . test_request_context ( ) : #NEWLINE# #INDENT# response = self . client . get ( url_for ( 'test' , user = 'foo' ) ) #NEWLINE# #UNINDENT# self . assertEqual ( { #NEWLINE# #INDENT# 'username' : 'foo' , #NEWLINE# 'name' : 'bar' , #NEWLINE# 'id' : unicode ( test_obj . id ) , #NEWLINE# #UNINDENT# } , json . loads ( response . data ) )