This commit is contained in:
Romain Bignon 2013-04-01 15:17:04 +02:00
commit 9f9f8edc01
3 changed files with 9 additions and 24 deletions

View file

@ -61,9 +61,10 @@ class Boursorama(BaseBrowser):
if self.enable_twofactors:
self.page.authenticate(self.device)
else:
print \
"""Boursorama - activate the two factor authentication in boursorama config."""\
""" You will receive SMS code but are limited in request per day (around 15)"""
raise BrowserIncorrectAuthenticationCode(
"""Boursorama - activate the two factor authentication in boursorama config."""\
""" You will receive SMS code but are limited in request per day (around 15)"""
)
def login(self):
assert isinstance(self.username, basestring)
@ -72,9 +73,6 @@ class Boursorama(BaseBrowser):
assert isinstance(self.enable_twofactors, bool)
assert self.password.isdigit()
#for debug, save requested pages to tmp dir
#self.SAVE_RESPONSES = True
if not self.is_on_page(LoginPage):
self.location('https://' + self.DOMAIN + '/connexion.phtml')
@ -93,12 +91,8 @@ class Boursorama(BaseBrowser):
#if the login was correct but authentication code failed,
#we need to verify if bourso redirect us to login page or authentication page
if self.is_on_page(LoginPage):
#print "not correct after handling authentication"
raise BrowserIncorrectAuthenticationCode()
#print "login over"
def get_accounts_list(self):
if not self.is_on_page(AccountsList):
self.location('/comptes/synthese.phtml')