zopefoundation / zope.testbrowser

Programmable browser for functional black-box tests
Other
21 stars 16 forks source link

Invalidate caches in Browser.goBack() #84

Closed cjwatson closed 5 years ago

cjwatson commented 5 years ago

Most of the cached attributes invalidated by Browser._changed() were based on the response, so it makes more sense to invalidate them from Browser._setResponse. This means that Browser.goBack() now invalidates these caches, so subsequent uses of methods such as Browser.getLink() work properly.

_req_content_type is an exception to this: this is a property of the request, set by Browser.post(), and it still makes sense to clear this in Browser._preparedRequest().

Fixes #83.