4teamwork / ftw.testbrowser

A testing browser for Plone.
http://ftwtestbrowser.readthedocs.io/
5 stars 1 forks source link

Preserve current zope.globalrequest request when opening pages with mechanize. #35

Closed deiferni closed 8 years ago

deiferni commented 8 years ago

Mechanize requests run in the same thread as the currently executed test. The current zope.gloablrequest request is cleared after publishing when an IPubSuccess event is fired. This breaks getRequest for the current test-case.

With these changes the current zope.gloablrequest request is preserved after opening a page.

When using LIB_REQUESTS no changes are required since those requests run in another thread.

deiferni commented 8 years ago

@jone plz have a look cc @lukasgraf