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?)
Marius Gedminas
--
It is easier to optimize correct code than to correct optimized code.
-- Bill Harlan
signature.asc
Description: Digital signature
