#NEWLINE# def test_serialize_jsonp( ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'status' : 'ok' , #NEWLINE# 'artists' : [ { #NEWLINE# #INDENT# 'name' : 'Jean Michel Jarre' , #NEWLINE# 'year' : 1948 , #NEWLINE# 'cities' : [ 'Paris' , 'Lyon' ] , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# resp = serialize_response ( data , 'jsonp:getData' ) #NEWLINE# assert_equals ( 'application/javascript; charset=UTF-8' , resp . content_type ) #NEWLINE# expected = 'getData({"status": "ok", "artists": [{"cities": ["Paris", "Lyon"], "name": "Jean Michel Jarre", "year": 1948}]})' #NEWLINE# assert_equals ( expected , resp . data )