Sylvie Ye
Committed by Romain Bignon

[bnp] error with code 1001 is now a website unavailable error

code 1001 "Une erreur est survenue, veuillez rafraîchir votre page"
is more website unavailable than incorrect password
......@@ -205,15 +205,16 @@ class LoginPage(JsonPage):
if not msg:
msg = self.get('message')
wrongpass_codes = [201, 21510, 203, 202, 1001, 7]
wrongpass_codes = [201, 21510, 203, 202, 7]
actionNeeded_codes = [21501, 3, 4, 50]
websiteUnavailable_codes = [207, 1001]
if error in wrongpass_codes:
raise BrowserIncorrectPassword(msg)
elif error == 21: # "Ce service est momentanément indisponible. Veuillez renouveler votre demande ultérieurement." -> In reality, account is blocked because of too much wrongpass
raise ActionNeeded(u"Compte bloqué")
elif error in actionNeeded_codes:
raise ActionNeeded(msg)
elif error == 207:
elif error in websiteUnavailable_codes:
raise BrowserUnavailable(msg)
else:
assert False, 'Unexpected error at login: "%s" (code=%s)' % (msg, error)
......