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 <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from collections import OrderedDict
from weboob.capabilities.bank import CapBank
......@@ -31,19 +34,21 @@ __all__ = ['GanAssurancesModule']
class GanAssurancesModule(AbstractModule, CapBank):
NAME = 'ganassurances'
MAINTAINER = u'Romain Bignon'
MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@weboob.org'
VERSION = '1.6'
DESCRIPTION = u'Gan Assurances'
DESCRIPTION = 'Gan Assurances'
LICENSE = 'LGPLv3+'
website_choices = OrderedDict([(k, u'%s (%s)' % (v, k)) for k, v in sorted({
'espaceclient.groupama.fr': u'Groupama Banque',
'espaceclient.ganassurances.fr': u'Gan Assurances',
'espaceclient.ganpatrimoine.fr': U'Gan Patrimoine',
}.items(), key=lambda k_v: (k_v[1], k_v[0]))])
CONFIG = BackendConfig(Value('website', label='Banque', choices=website_choices, default='espaceclient.ganassurances.fr'),
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({
'espaceclient.groupama.fr': 'Groupama Banque',
'espaceclient.ganassurances.fr': 'Gan Assurances',
'espaceclient.ganpatrimoine.fr': 'Gan Patrimoine',
}.items(), key=lambda k_v: (k_v[1], k_v[0]))])
CONFIG = BackendConfig(
Value('website', label='Banque', choices=website_choices, default='espaceclient.ganassurances.fr'),
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