Commit c943f648 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[cmes/cices] Re-order arguments in the browser instanciation

The arguments were not in the same order in the module.py of CMES and in
the browser __init of cmes and its children modules.
CMES has several children, including CICES.
parent b20f4a4e
......@@ -43,10 +43,12 @@ class CicesModule(Module, CapBankPockets):
BROWSER = CmesBrowser
def create_default_browser(self):
return self.create_browser('https://www.cic-epargnesalariale.fr',
self.config['login'].get(),
self.config['password'].get(),
weboob=self.weboob)
return self.create_browser(
self.config['login'].get(),
self.config['password'].get(),
'https://www.cic-epargnesalariale.fr',
weboob=self.weboob
)
def get_account(self, _id):
return find_object(self.browser.iter_accounts(), id=_id, error=AccountNotFound)
......
......@@ -42,8 +42,7 @@ class CmesBrowser(LoginBrowser):
'(?P<subsite>.*)fr/.*GoOperationDetails', HistoryPage)
custom_page = URL('/fr/espace/personnel/index.html', CustomPage)
def __init__(self, website, username, password, subsite="", *args, **kwargs):
def __init__(self, username, password, website, subsite="", *args, **kwargs):
super(LoginBrowser, self).__init__(*args, **kwargs)
self.BASEURL = website
self.username = username
......
......@@ -43,7 +43,11 @@ class CmesModule(Module, CapBankPockets):
BROWSER = CmesBrowser
def create_default_browser(self):
return self.create_browser('https://www.creditmutuel-epargnesalariale.fr', self.config['login'].get(), self.config['password'].get())
return self.create_browser(
self.config['login'].get(),
self.config['password'].get(),
'https://www.creditmutuel-epargnesalariale.fr',
)
def get_account(self, _id):
return find_object(self.browser.iter_accounts(), id=_id, error=AccountNotFound)
......
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