Commit ca86b06f authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Vincent A

[netfinca] New method check_action_needed

This is mainly used during iter_accounts, but also in the cragr module
before calling is_account_present.
parent 8fa795ef
......@@ -38,12 +38,16 @@ class NetfincaBrowser(LoginBrowser):
raise BrowserUnavailable()
def iter_accounts(self):
self.accounts.stay_or_go()
self.check_action_needed()
return self.page.iter_accounts()
def check_action_needed(self):
self.accounts.stay_or_go()
message = self.page.get_action_needed_message()
if 'merci de renseigner les informations' in message:
# Customers have to fill their e-mail address and phone number
raise ActionNeeded(message)
return self.page.iter_accounts()
def iter_investments(self, account):
self.accounts.stay_or_go()
......
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