Regexp for checking password
This commit is contained in:
parent
80e9dbd91d
commit
b699ddc3f9
2 changed files with 1 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ class CragrModule(Module, CapBank):
|
||||||
}.iteritems())])
|
}.iteritems())])
|
||||||
CONFIG = BackendConfig(Value('website', label=u'Région', choices=website_choices),
|
CONFIG = BackendConfig(Value('website', label=u'Région', choices=website_choices),
|
||||||
ValueBackendPassword('login', label=u'N° de compte', masked=False),
|
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
|
BROWSER = Cragr
|
||||||
|
|
||||||
def create_default_browser(self):
|
def create_default_browser(self):
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,6 @@ class HomePage(Page):
|
||||||
|
|
||||||
class LoginPage(Page):
|
class LoginPage(Page):
|
||||||
def login(self, password):
|
def login(self, password):
|
||||||
assert password.isdigit()
|
|
||||||
assert len(password) == 6
|
|
||||||
|
|
||||||
imgmap = {}
|
imgmap = {}
|
||||||
for td in self.document.xpath('//table[@id="pave-saisie-code"]/tr/td'):
|
for td in self.document.xpath('//table[@id="pave-saisie-code"]/tr/td'):
|
||||||
a = td.find('a')
|
a = td.find('a')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue