You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen variations on this, some of which end up in an error like
Failed example:
manager.reload()
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest invitations.txt[101]>", line 1, in <module>
manager.reload()
File "/home/mg/src/zopefoundation/zope.testbrowser/src/zope/testbrowser/browser.py", line 197, in reload
resp = self.testapp.request(req)
File "/home/mg/src/ivija/.tox/py27-latest/local/lib/python2.7/site-packages/webtest/app.py", line 581, in request
req = url_or_req.copy()
File "/home/mg/src/ivija/.tox/py27-latest/local/lib/python2.7/site-packages/webob/request.py", line 861, in copy
self.make_body_seekable()
File "/home/mg/src/ivija/.tox/py27-latest/local/lib/python2.7/site-packages/webob/request.py", line 929, in make_body_seekable
self.copy_body()
File "/home/mg/src/ivija/.tox/py27-latest/local/lib/python2.7/site-packages/webob/request.py", line 953, in copy_body
data = input.read(min(todo, 65535))
File "/home/mg/src/ivija/.tox/py27-latest/local/lib/python2.7/site-packages/webob/request.py", line 1544, in readinto
"(%d more bytes were expected)" % (self.remaining,)
DisconnectionError: The client disconnected while sending the body (79 more bytes were expected)
and some of which silently end up with a browser.contents of ''. (that was actually a different bug, see #75)
I get the impression that submitting a form and then calling reload() in the old mechanize-based testbrowser used to replay the last POST request as a GET to the same URL.
I don't think that's a good idea either, so what I propose instead is to have zope.testbrowser explicitly raise a BrowserStateError() if you try to reload a POST.
The text was updated successfully, but these errors were encountered:
mgedmin
added
the
compat
Compatibility issues due to mechanize -> webtest migration in 5.0.0
label
Jun 27, 2019
I get the impression that submitting a form and then calling reload() in the old mechanize-based testbrowser used to replay the last POST request as a GET to the same URL.
Looks like no, it was actually repeating the POST. And the new zope.testbrowser has a test to make sure .reload() repeats the POST, but it sometimes fails.
I've seen variations on this, some of which end up in an error like
and some of which silently end up with a(that was actually a different bug, see #75)browser.contents
of''
.I get the impression that submitting a form and then calling
reload()
in the old mechanize-based testbrowser used to replay the last POST request as a GET to the same URL.I don't think that's a good idea either, so what I propose instead is to have zope.testbrowser explicitly raise a BrowserStateError() if you try to reload a POST.
The text was updated successfully, but these errors were encountered: