[twill] redirects and debug output

Pam Zerbinos pzerbinos at gmail.com
Mon Mar 24 07:23:30 PDT 2008

Does anyone know if there is some way to introspect the debug output?
Actually, let me back up.

I need to write a test in which I pretend to be a Googlebot and verify that
I never see a redirect (response code 302). So far, there are two problems
with my plan:
1. code(302) always throws an assertion error, even when there IS a
redirect, because twill doesn't run the assert until it stops getting
redirected, at which point I've got a 200
2. I can see the 302s by flipping on debug, but I can't figure out if there
is some way to actually introspect the debug output without just running the
test manually and watching things scroll by (which defeats the purpose of an
automated test)

In my dream world, there is a secret option to make debug dump its output
into a dict. In my slightly less perfect dream world, there is an option to
make twill not follow redirects. Here in the real world, I'm at a bit of a


Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.idyll.org/pipermail/twill/attachments/20080324/610103a2/attachment.html 

More information about the twill mailing list