Commit 02cf0045 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Vincent A

[caissedepargne] Fix some true wrongpass for banquepopulaire

We can have a failed_authentication here. To avoid to crash, a default
value here allows to catch wrongpass further. Only seen for
banquepopulaire module. An AssertionError has been added for caissedepargne
 in case of empty redirect_data.
parent b2c9960c
......@@ -684,6 +684,8 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
self.page.check_errors(feature=feature)
redirect_data = self.page.get_redirect_data()
assert redirect_data, 'redirect_data must not be empty'
self.location(
redirect_data['action'],
data={
......
......@@ -226,7 +226,9 @@ class AuthenticationMethodPage(JsonPage):
class AuthenticationStepPage(AuthenticationMethodPage):
def get_redirect_data(self):
return Dict('response/saml2_post')(self.doc)
# In case of wrongpass the response key does not exist
# So it needs a default value
return Dict('response/saml2_post', default=NotAvailable)(self.doc)
class VkImagePage(JsonPage):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment