Exemple #1
0
 def send_request(self, host, handler_path, request_body, verbose=None):
     self.connected_host = host
     test = self.testcase
     self.got_request = True
     unpacked, method = xmlrpc_loads(request_body)
     if None in unpacked:
         raise AssertionError(
             "xmlrpc result %r shouldn't contain None" % (unpacked, ))
     self.sent_params = unpacked
     return InstrumentedXMLRPCConnection(test)
Exemple #2
0
 def send_content(self, conn, request_body):
     unpacked, method = xmlrpc_loads(request_body)
     if None in unpacked:
         raise AssertionError("xmlrpc result %r shouldn't contain None" %
                              (unpacked, ))
     self.sent_params = unpacked
Exemple #3
0
class XmlRpcSerializer(object):
    dumps = lambda value: xmlrpc_dumps((value, ))
    loads = lambda value: xmlrpc_loads(value)[0][0]
Exemple #4
0
def process_body():
    """Return (params, method) from request body."""
    try:
        return xmlrpc_loads(cherrypy.request.body.read())
    except Exception:
        return ('ERROR PARAMS', ), 'ERRORMETHOD'