testbrowser Patches

by Ross Patterson last modified 2009-08-23T22:12:07+02:00
collective.testcaselayer 1.2 includes some patches for functional browser testing

To use these patches, include the collective.testcaselayer configure.zcml. The patches address some bugs in Testing.ZopeTestCase.

Data streamed to the response

Due to some behavior in Testing.ZopeTestCase.zopedoctest.functional, the testbrowser.contents was empty when data had been streamed directly into the response (as opposed to returning the data from the callable published). This made it difficult to do functional testing for code that needed to stream data to the response for performance, such as when the response data is very large and would consume too much memory.


Due to bug #98437, "TestBrowser Referer: header set to 'localhost'", some testbrowser requests would raise NotFound. Two examples would be visiting the Plone login_form directly rather than following a link, or using the Plone content_status_history form.