You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of 07/22/21:
Beware! Connexion has released two new versions in the last 14 days (2.8.0 and 2.9.0) and both are incompatible with the way our microsetta-private-api unit tests (e.g. in test_admin_api.py, test_api.py, and test_integration.py) mock get and post requests. It appears that as of connexion 2.8.0, the connexion authors have introduced a new object called a security handler factory that now handles requests, and it passes down the chain an argument called “required_scopes”. That argument appears to be propagated all the way down to python’s “mock_call” method, in which a call to “mock_verify” fails because it is receiving an unexpected parameter called “required_scopes”. (edited)
This causes every test in the entire microsetta-private-api test suite that mocks a get or post request to fail :man-facepalming::skin-tone-4:. Changing the pip requirements to prevent using a connexion version later than 2.7.0 makes everything pass again.
Dunno if this is a long-term solution, though … but figuring out how to change the mocking to avoid this is beyond me …
The text was updated successfully, but these errors were encountered:
@wasade yes, changing the pip requirements to prevent using a connexion version later than 2.7.0 makes everything pass again ... but presumably eventually being stuck on an old version of connexion will itself become a problem, so I'm just recording this for someday
As of 07/22/21:
Beware! Connexion has released two new versions in the last 14 days (2.8.0 and 2.9.0) and both are incompatible with the way our microsetta-private-api unit tests (e.g. in test_admin_api.py, test_api.py, and test_integration.py) mock get and post requests. It appears that as of connexion 2.8.0, the connexion authors have introduced a new object called a security handler factory that now handles requests, and it passes down the chain an argument called “required_scopes”. That argument appears to be propagated all the way down to python’s “mock_call” method, in which a call to “mock_verify” fails because it is receiving an unexpected parameter called “required_scopes”. (edited)
This causes every test in the entire microsetta-private-api test suite that mocks a get or post request to fail :man-facepalming::skin-tone-4:. Changing the pip requirements to prevent using a connexion version later than 2.7.0 makes everything pass again.
Dunno if this is a long-term solution, though … but figuring out how to change the mocking to avoid this is beyond me …
The text was updated successfully, but these errors were encountered: