With zope.testbrowser.wsgi.Browser in zope.testbrowser 4.0.0 a HostNotAllowed error is now raised when you try to access a domain that is not localhost, *.example.com, *.example.net or *.example.org:
>>> browser.open('http://localhost/redirect.html?to=http://www.google.com') Traceback (most recent call last): ... HostNotAllowed: http://www.google.com/
I think this is sufficient to test redirects to remote sites without actually visiting them.
Also since the old zope.app.testing connection is deprecated, I'm going closing this issue.
With zope.testbrowse r.wsgi. Browser in zope.testbrowser 4.0.0 a HostNotAllowed error is now raised when you try to access a domain that is not localhost, *.example.com, *.example.net or *.example.org:
>>> browser.open('http:// localhost/ redirect. html?to= http:// www.google. com') www.google. com/
Traceback (most recent call last):
...
HostNotAllowed: http://
I think this is sufficient to test redirects to remote sites without actually visiting them.
Also since the old zope.app.testing connection is deprecated, I'm going closing this issue.