[Zope-dev] zope.testbrowser behavour on HTTPError

Adam GROSZER agroszer at gmail.com
Wed Jun 17 04:42:43 EDT 2009


Hello,

I noticed that if a click or some action causes an HTTPError in a
Browser, the old page content stays in .contents.
Exception comes at self.browser._clickSubmit, thus _changed() never
gets executed.
403 and such errors definitely return content.

Opinions? Anyone against a fix?

class SubmitControl(Control):
    interface.implements(interfaces.ISubmitControl)

    def click(self):
        if self._browser_counter != self.browser._counter:
            raise interfaces.ExpiredError
        self.browser._clickSubmit(self.mech_form, self.mech_control, (1,1))
        self.browser._changed()

-- 
Best regards,
 Adam GROSZER                          mailto:agroszer at gmail.com
--
Quote of the day:
Words tend to be inadequate



More information about the Zope-Dev mailing list