#NEWLINE# def send_rpc( self , svc , path , data , **kw ) : #NEWLINE# #INDENT# '\n      :param svc:\n      :param path:\n          the path of the request.  In the WSGI environment this will end up as\n          `PATH_INFO`.  If the `query_string` is not defined and there is a\n          question mark in the `path` everything after it is used as querystring.\n      :param base_url:\n          the base URL is a URL that is used to extract the WSGI URL scheme,\n          host (server name + server port) and the script root (`SCRIPT_NAME`).\n      :param query_string: an optional string or dict with URL parameters.\n    ' #NEWLINE# svc . response_class = RemoteResponse #NEWLINE# response = svc . test_client ( ) . post ( path = path , follow_redirects = True , data = data , content_type = 'application/json' , headers = { #NEWLINE# #INDENT# 'Accept' : 'application/json' , #NEWLINE# 'Content-Type' : 'application/json' , #NEWLINE# 'X-Requested-With' : 'XMLHttpRequest' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( ( response . data and ( len ( response . data ) > 0 ) ) , ( 'Call to: "%s" returned no response data.' % path ) ) #NEWLINE# return ( response , loads ( response . data ) )