[Checkins] [zopefoundation/zope.testbrowser] 8596a2: Take raiseHttpErrors into account on submit

GitHub noreply at github.com
Wed Sep 4 11:28:59 CEST 2013


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/zope.testbrowser
  Commit: 8596a29b894aab9f64de5cae5894cf772ab59b62
      https://github.com/zopefoundation/zope.testbrowser/commit/8596a29b894aab9f64de5cae5894cf772ab59b62
  Author: Nicolas Dietrich <nicodietrich at gmail.com>
  Date:   2013-05-12 (Sun, 12 May 2013)

  Changed paths:
    M src/zope/testbrowser/browser.py

  Log Message:
  -----------
  Take raiseHttpErrors into account on submit

If an HTTPError is raised on `browser.submit`, it should only be
reraised to the user if `browser.raiseHttpErrors=True`.

This behavior already applies to `browser.open`, thus it is expected to
apply to `browser.submit` as well.


  Commit: b7a69595059bfb1a9a019922b6382855194d8be4
      https://github.com/zopefoundation/zope.testbrowser/commit/b7a69595059bfb1a9a019922b6382855194d8be4
  Author: Nicolas Dietrich <nicodietrich at gmail.com>
  Date:   2013-05-14 (Tue, 14 May 2013)

  Changed paths:
    M src/zope/testbrowser/ftests/forms.html
    M src/zope/testbrowser/tests/test_wsgi.py

  Log Message:
  -----------
  Add tests confirming redirect behavior

The following functional tests are added:

* Perform redirect on browser.submit if 30x is returned

If `browser.mech_browser.set_handle_redirects(False)` is called and
`browser.raiseHttpErrors` is set to `False`, redirects shouldn't be
performed automatically:

* Do not perform redirect on browser.open if 30x is returned
* Do not perform redirect on browser.submit if 30x is returned

The last of the 3 added tests tests the code introduced in GitHub
zopefoundation/zope.testbrowser#4, while the first two tests confirm
prior behavior.


  Commit: 4509c3a6d8bae7f452a442286d58a6cc8f16adb8
      https://github.com/zopefoundation/zope.testbrowser/commit/4509c3a6d8bae7f452a442286d58a6cc8f16adb8
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-09-04 (Wed, 04 Sep 2013)

  Changed paths:
    M src/zope/testbrowser/browser.py
    M src/zope/testbrowser/ftests/forms.html
    M src/zope/testbrowser/tests/test_wsgi.py

  Log Message:
  -----------
  Merge pull request #4 from nidico/use-raiseHttpErrors-on-submit

Take raiseHttpErrors into account on submit


Compare: https://github.com/zopefoundation/zope.testbrowser/compare/53cdbbc9fc39...4509c3a6d8ba


More information about the checkins mailing list