Shannon -jj Behrens wrote: > * To test your controllers somewhat in isolation, instead of calling > render_response, call my_render_response which you write yourself. In > my_render_response, in testing mode, you can simply return JSON, and, > in real mode, you can return a real page. Then, you can test the data > in the JSON--i.e. the page model.
Haven't been following all of this, but even when you render a template in your tests you can see the variables the template was rendered with. res.template_vars maybe? I can't remember what it's called in Pylons. Anyway, anyone can add data that gets passed back to the test framework by putting stuff in environ['paste.testing_variables']; each key in that dictionary is turned into an attribute of the response object. This way you can two tests at once; test the template works (at least doesn't give an exception), and that the data was what you expected. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
