Comment 1 for bug 344680

Revision history for this message
Benji York (benji) wrote : Re: [Bug 344680] [NEW] Missing support for request-object in zope.testbrowser after r84900

On Wed, Mar 18, 2009 at 3:33 AM, Malthe <email address hidden> wrote:
> Public bug reported:
>
> Code snippet:
>
>>>>    def open(self, url, data=None):
>>>>       """See zope.testbrowser.interfaces.IBrowser"""
>>>>        url = str(url)
>
> This string coercion is unfortunate, because ``mechanize`` accepts a
> (mechanize-) request-object in place of a URL string here. Using a
> custom request object allows us to do such things as setting the
> REQUEST_TYPE header string, which is not possible throught the
> standard API.

Using mechanize request objects wasn't intentionally supported (hence
the lack of tests for it). Mechanize is just an implementation detail
of testbrowser, mechanize shouldn't be exposed to users of testbrowser.

What do you want mechanize request object support for?