From 961852c7dda6ef194407ed86cfa98dfef39f560f Mon Sep 17 00:00:00 2001 From: Abderraouf Zerroug Date: Fri, 3 Jul 2020 15:03:25 +0200 Subject: [PATCH] [creditdunord] Modified get_account_type to take into account type 'COMPTE COURANT TITRE" --- modules/creditdunord/pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index 1141d37aef..10cd70209c 100755 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -318,7 +318,6 @@ class AccountsPageMixin(LoggedPage, CDNBasePage): 'PRÊT': Account.TYPE_LOAN, 'CREDIT': Account.TYPE_LOAN, 'FACILINVEST': Account.TYPE_LOAN, - 'TITRES': Account.TYPE_MARKET, 'COMPTE TIT': Account.TYPE_MARKET, 'PRDTS BLOQ. TIT': Account.TYPE_MARKET, 'PRODUIT BLOQUE TIT': Account.TYPE_MARKET, @@ -326,6 +325,10 @@ class AccountsPageMixin(LoggedPage, CDNBasePage): } def get_account_type(self, label): + # To differenciate between 'COMPTE COURANT' & 'COMPTE COURANT TITRES', + # in the TYPES dictionary, we type Market accounts right away + if 'TITRES' in label: + return Account.TYPE_MARKET for pattern, actype in sorted(self.TYPES.items()): if label.startswith(pattern) or label.endswith(pattern): return actype -- GitLab