Commit 11c56608 authored by Wichert Akkerman's avatar Wichert Akkerman

Update Five's testbrowser to support both mechanize 0.1.x and 0.2.x.

parent db63355c
......@@ -11,6 +11,8 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++
- Update Five's testbrowser to support both mechanize 0.1.x and 0.2.x.
- Five's processInputs() would stomp on :list or :tuple values that contained
ints or other non-strings, would clear out :records entirely, and would not
do anything for :record fields.
......
......@@ -95,15 +95,10 @@ class PublisherMechanizeBrowser(mechanize.Browser):
'_equiv', '_basicauth', '_digestauth' ]
def __init__(self, *args, **kws):
inherited_handlers = ['_unknown', '_http_error',
'_http_request_upgrade', '_http_default_error', '_basicauth',
'_digestauth', '_redirect', '_cookies', '_referer',
'_refresh', '_equiv', '_gzip']
self.handler_classes = {"http": PublisherHTTPHandler}
for name in inherited_handlers:
self.handler_classes[name] = mechanize.Browser.handler_classes[name]
self.handler_classes = mechanize.Browser.handler_classes.copy()
self.handler_classes["http"] = PublisherHTTPHandler
self.default_others = [cls for cls in self.default_others
if cls in mechanize.Browser.handler_classes]
mechanize.Browser.__init__(self, *args, **kws)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment