You could expose it as json, which would just render the objects from the 
dict you return.

E.g.
@expose('json')
def func(self):
    return dict(a='blah')

would let you access: /func.json and get:
{"a": "blah"}

Does that help you?

Am Donnerstag, 3. Mai 2012 23:13:30 UTC+2 schrieb León Domingo:
>
> Hi guys,
> I'm begging to testing with TG and a question comes up.
>
> WebTest allows us to get the response from a particular URL but that 
> response is the rendered version, the associated template + returning dict 
> from the controller.
> Is there a way to get only the dict returned by the controller? My idea is 
> to test the "web side" with Selenium, so the dict is the only information I 
> need at this moment.
>
> Thanks in advance
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/q3dXOVUkS08J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to