ERP5Type/tests: support Zope4's Testing.makerequest.makerequest
On Zope2, there was support for starting a ZServer (in Testing.ZopeTestCase.utils.startZServer) and there was another makerequest (in Testing.ZopeTestCase.utils.makerequest) which had knowledge of this ZServer address. We are using our own implementation of startZServer, which also knows how to start a WSGI server, but we we were interacting with Testing.ZopeTestCase.utils so that its makerequest knows about our web server. On Zope4 there is no utility to start an http server from the tests and the makerequest is also gone. This revisits the web server from test interaction with makerequest: - no longer use PortalTestCase._app which creates an app with a request to http://nohost, but implement our own _app which creates a request to our web server - store our server address as class attributes on ProcessingNodeTestCase instead of patching pseudo constants in utils (these pseudo constants no longer exist) - in the case of ERP5TypeLiveTestCase, also rewrap the site to use a request to our web server (which was done on Zope2 by using Testing.ZopeTestCase.utils.makerequest and not Testing.makerequest.makerequest directly)
Showing
Please register or sign in to comment