Regexp for checking password

This commit is contained in:
Vincent Paredes 2014-10-08 17:40:04 +02:00 committed by Romain Bignon
commit b699ddc3f9
2 changed files with 1 additions and 4 deletions

View file

@ -80,7 +80,7 @@ class CragrModule(Module, CapBank):
}.iteritems())])
CONFIG = BackendConfig(Value('website', label=u'Région', choices=website_choices),
ValueBackendPassword('login', label=u'N° de compte', masked=False),
ValueBackendPassword('password', label=u'Code personnel'))
ValueBackendPassword('password', label=u'Code personnel', regexp=r'\d{6}'))
BROWSER = Cragr
def create_default_browser(self):

View file

@ -42,9 +42,6 @@ class HomePage(Page):
class LoginPage(Page):
def login(self, password):
assert password.isdigit()
assert len(password) == 6
imgmap = {}
for td in self.document.xpath('//table[@id="pave-saisie-code"]/tr/td'):
a = td.find('a')