#NEWLINE# def test_render_out_to_file( self ) : #NEWLINE# #INDENT# self . app = self . make_app ( APP , extensions = [ 'json' ] , output_handler = 'json' ) #NEWLINE# self . app . setup ( ) #NEWLINE# self . app . run ( ) #NEWLINE# f = open ( f . tmp_file , 'w' ) #NEWLINE# self . app . render ( dict ( foo = 'bar' ) , out = f ) #NEWLINE# f . close ( ) #NEWLINE# f = open ( self . tmp_file , 'r' ) #NEWLINE# data = json . load ( f ) #NEWLINE# f . close ( ) #NEWLINE# self . eq ( data , dict ( foo = 'bar' ) )