On Sun, 2010-12-19 at 17:57 +0200, Marius Gedminas wrote:
> On Sun, Dec 19, 2010 at 01:00:06AM -0800, Mike Burrows wrote:
> > Two things you need to know:
> > 
> > 1) If you expect a status other than 200 OK your test needs to specify
> > it or you get an error:
> >         response = self.app.post(..., status=302)
> > 2) The redirect location ends up in response.response.location; you
> > can check it or follow it, e.g.:
> >         response = self.app.get(response.response.location)
> 
> If you're using WebTest, you can shorten that to
> 
>           response = response.follow()
> 
> (Do any of the Pyramid project templates actually set up WebTest?)

No, but I just added a section to the docs that explain how to create a
WebTest functest:

https://github.com/Pylons/pyramid/commit/6ee49a1d815cb6fd279e55ddd77ec89a64fcbce9#diff-5

- C


-- 
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.

Reply via email to