Commit 0716bc2a authored by Damien Mat's avatar Damien Mat Committed by Vincent A

[ganassurances] Regex in ValueBackendPassword and unicode_literals

Put a regex in ValueBackendPassword to check for a valid password format
Updated unicode with unicode_literals

Closes: 11797@zendesk, 29323@sibi
parent 43e3c907
......@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this weboob module. If not, see <>.
from __future__ import unicode_literals
from collections import OrderedDict
from import CapBank
......@@ -31,19 +34,21 @@ __all__ = ['GanAssurancesModule']
class GanAssurancesModule(AbstractModule, CapBank):
NAME = 'ganassurances'
MAINTAINER = u'Romain Bignon'
MAINTAINER = 'Romain Bignon'
EMAIL = ''
VERSION = '1.6'
DESCRIPTION = u'Gan Assurances'
DESCRIPTION = 'Gan Assurances'
website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({
'': u'Groupama Banque',
'': u'Gan Assurances',
'': U'Gan Patrimoine',
}.items(), key=lambda k_v: (k_v[1], k_v[0]))])
CONFIG = BackendConfig(Value('website', label='Banque', choices=website_choices, default=''),
ValueBackendPassword('login', label=u'Numéro client', masked=False),
ValueBackendPassword('password', label=u"Code d'accès"))
website_choices = OrderedDict([(k, '%s (%s)' % (v, k)) for k, v in sorted({
'': 'Groupama Banque',
'': 'Gan Assurances',
'': 'Gan Patrimoine',
}.items(), key=lambda k_v: (k_v[1], k_v[0]))])
CONFIG = BackendConfig(
Value('website', label='Banque', choices=website_choices, default=''),
ValueBackendPassword('login', label='Identifiant / N° Client ou Email ou Mobile', masked=False),
ValueBackendPassword('password', label='Mon mot de passe', regexp=r'^\d+$')
BROWSER = GanAssurances
PARENT = 'groupama'
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