ziggurat_foundations
ziggurat_foundations copied to clipboard
Problem using Pylons/webtest
I'm trying to use Pylons/webtest for validation of my app.
In normal conditions, using ziggurat_foundations.ext.pyramid.sign_in
with ziggurat_foundations.sign_in.sign_in_pattern = /signin_internal
in my config, I can successfully route the app url using ziggurat.routes.sign_in
. Login works as intended.
When using the same procedure with webtest.TestApp
, the /signin_internal
route returns an 500 response caused by HTTPConnectionPool
with max retries exceeded, like if the path didn't exist.
Integration between pyramid and ziggurat seems to be very advanced and solid, so I'm wondering what could be the source of this problem? Any leads or suggestions where to investigate for error causes?
Hm,
Can you provide a minimal test for that that would be failing for you? We could investigate together then.
The repo is here : https://github.com/Ouranosinc/Magpie The signin procedure is here: https://github.com/Ouranosinc/Magpie/blob/master/magpie/api/login/login.py#L45-L70
The signin fails here during setup for the following tests that require to be logged in : https://github.com/Ouranosinc/Magpie/blob/master/tests/test_magpie_api.py#L77-L81
Route /signin
is called properly, but when it tries to call /signin_internal
to run the normal ziggurat login, it cannot find the route somehow. The same tests with a reference to an already running server with the app causes no problem and the tests succeed.
Hey @fmigneault sorry that I did not reply earlier, I was very busy. I will try to find some time to look at this in upcoming days.
@ergo Thanks. No problem about the delay, I was also away recently.