#NEWLINE# def test_jsonp_render( render_json = None ) : #NEWLINE# #INDENT# if ( render_json is None ) : #NEWLINE# #INDENT# render_json = JSONPRender ( qp_name = 'callback' , dev_mode = True ) #NEWLINE# #UNINDENT# app = Application ( [ ( '/' , hello_world_ctx , render_json ) , ( '/<name>/' , hello_world_ctx , render_json ) , ( '/beta/<name>/' , complex_context , render_json ) ] ) #NEWLINE# c = Client ( app , BaseResponse ) #NEWLINE# resp = c . get ( '/?callback=test_callback' ) #NEWLINE# ( yield ( eq_ , resp . status_code , 200 ) ) #NEWLINE# ( yield ( ok_ , resp . data . startswith ( 'test_callback' ) ) ) #NEWLINE# ( yield ( ok_ , ( 'world' in resp . data ) ) ) #NEWLINE# resp = c . get ( '/?callback=test_callback' ) #NEWLINE# ( yield ( eq_ , resp . status_code , 200 ) ) #NEWLINE# ( yield ( ok_ , resp . data . startswith ( 'test_callback' ) ) ) #NEWLINE# ( yield ( ok_ , ( 'world' in resp . data ) ) )