On Tue, Oct 14, 2008 at 8:48 AM, avillena <[EMAIL PROTECTED]> wrote:
>
> Thanks!
> The doubt that remains is how I can send parameters to the
> XMLRPCController. Using app.post giving an XML request document by
> hand?

you can pass a dict or a query_string as the second parameter to post,
which will be transformed into the POST data, so my guess is that you
need something in the likes of:
app.post("/url/to/controller/",{'data':xml_obj}) now two things are
uncertain, which is the value of data, I haven't used XMLRPController
that much to know the correct post parameter, and if you need to
escape or stringify xml_obj, I think the last one isn't needed, at
least it isn't for json objects. A quick peak at plyons
XMLRPCCOntroller suggest me you should be using xmlrpclib.dumps to
build a proper body for the request.

> Any experience doing that?
>
> Good luck
>  Agustin
>
>
> On Oct 10, 4:57 pm, "Jorge Vargas" <[EMAIL PROTECTED]> wrote:
>> On Fri, Oct 10, 2008 at 1:56 PM, Jorge Vargas <[EMAIL PROTECTED]> wrote:
>> > On Fri, Oct 10, 2008 at 7:08 AM, avillena <[EMAIL PROTECTED]> wrote:
>>
>> >> Hi!
>> >> Does anybody knows how to use paste.fixture facilities to tests and
>> >> XMLRPCController, in a similar way to testing regular controllers?
>> >> Thanks
>> >>  Agustin
>>
>> > I'm not sure if this applies to paste.fixture, but I have done this
>> > with webtest which is the replacement module for paste.fixture
>> > (http://pythonpaste.org/webtest/)
>> > And it is exactly the same as a normal test. except that you will
>> > fetch the response with "response.json" and then do your thing.
>>
>> sorry my parser corrected that XMLRPC to jsonrpc, I have been doing
>> this for way too long.
>> response.xml  (Elementree) or response.lxml (lxml) is what you want.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to