These are chat archives for cherrypy/cherrypy

14th
Sep 2018
Jeffrey R. Van Voorst
@jeffvanvoorst
Sep 14 2018 23:41
@webknjaz I am wondering what you had in mind with pyriform and testing https. I might have setup my code in a different configuration than you had implied.
webtest.TestApp uses WSGIProxy2 to proxy calls to the real webserver if TestApp is constructed with a URL string.
The default lib used by WSGIProxy2 (httplib) seems unable to handle https (or I used it incorrectly).
I then configured TestApp to have WSGIProxy2 use requests instead of httplib.
Passing the resulting TestApp object to pyriform.make_session results in another instance of a requests Session to map a URL prefix to the TestApp.
Having code in this way results in two requests Sessions and the outer session (or pyriform) doesn't pass the Session parameters to the inner session.
In order to the client certificate and CA cert chain to the webserver, I would need to set the values for the inner requests Session (used by TestApp).
Maybe the idea wasn't to use TestApp in the first place. In that case, what was the intention? Maybe I missed one or more things.