Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Accomodate deform 0.9.4 bugfix for checked input widgets.

  • Loading branch information...
commit 97463e456dda3a4128f4a76bc53d973fffdabd41 1 parent ae34f38
@tseaver tseaver authored
Showing with 16 additions and 16 deletions.
  1. +16 −16 cartouche/tests/test_registration.py
View
32 cartouche/tests/test_registration.py
@@ -486,7 +486,7 @@ def test_GET_w_unknown_credentials(self):
def test_GET_w_known_credentials_initial_edit(self):
import re
- INPUT = re.compile('<input.* name="(?P<name>\w+)" '
+ INPUT = re.compile('<input.* name="(?P<name>[\w-]+)" '
'value="(?P<value>[^"]*)"', re.MULTILINE)
SELECT = re.compile('<select.* name="(?P<name>\w+)"', re.MULTILINE)
EMAIL = 'phred@example.com'
@@ -511,8 +511,8 @@ def test_GET_w_known_credentials_initial_edit(self):
self.assertEqual(inputs, [('login_name', EMAIL),
('email', EMAIL),
('old_password', ''), # hidden
- ('value', ''),
- ('confirm', ''),
+ ('password', ''),
+ ('password-confirm', ''),
('answer', ''),
])
selects = [x for x in SELECT.findall(rendered_form)]
@@ -521,7 +521,7 @@ def test_GET_w_known_credentials_initial_edit(self):
def test_GET_w_known_credentials_later_edit(self):
import re
from zope.password.password import SSHAPasswordManager
- INPUT = re.compile('<input.* name="(?P<name>\w+)" '
+ INPUT = re.compile('<input.* name="(?P<name>[\w-]+)" '
'value="(?P<value>[^"]*)"', re.MULTILINE)
SELECT = re.compile('<select.* name="(?P<name>\w+)"', re.MULTILINE)
EMAIL = 'phred@example.com'
@@ -548,8 +548,8 @@ def test_GET_w_known_credentials_later_edit(self):
self.assertEqual(inputs, [('login_name', 'before'),
('email', EMAIL),
('old_password', ''),
- ('value', ''),
- ('confirm', ''),
+ ('password', ''),
+ ('password-confirm', ''),
('answer', 'FXBG'),
])
selects = [x for x in SELECT.findall(rendered_form)]
@@ -620,8 +620,8 @@ def test_POST_w_old_password_miss(self):
('email', NEW_EMAIL),
('old_password', 'bogus'),
('__start__', 'password:mapping'),
- ('value', 'newpassword'),
- ('confirm', 'newpassword'),
+ ('password', 'newpassword'),
+ ('password-confirm', 'newpassword'),
('__end__', 'password:mapping'),
('__start__', 'security:mapping'),
('question', 'petname'),
@@ -663,8 +663,8 @@ def test_POST_w_password_confirm_mismatch(self):
('email', NEW_EMAIL),
('old_password', 'old_password'),
('__start__', 'password:mapping'),
- ('value', 'newpassword'),
- ('confirm', 'mismatch'),
+ ('password', 'newpassword'),
+ ('password-confirm', 'mismatch'),
('__end__', 'password:mapping'),
('__start__', 'security:mapping'),
('question', 'petname'),
@@ -708,8 +708,8 @@ def test_POST_w_password_match_new_login_not_unique(self):
('email', NEW_EMAIL),
('old_password', 'old_password'),
('__start__', 'password:mapping'),
- ('value', 'newpassword'),
- ('confirm', 'newpassword'),
+ ('password', 'newpassword'),
+ ('password-confirm', 'newpassword'),
('__end__', 'password:mapping'),
('__start__', 'security:mapping'),
('question', 'petname'),
@@ -749,8 +749,8 @@ def test_POST_w_password_match(self):
('email', NEW_EMAIL),
('old_password', 'old_password'),
('__start__', 'password:mapping'),
- ('value', 'newpassword'),
- ('confirm', 'newpassword'),
+ ('password', 'newpassword'),
+ ('password-confirm', 'newpassword'),
('__end__', 'password:mapping'),
('__start__', 'security:mapping'),
('question', 'petname'),
@@ -800,8 +800,8 @@ def test_POST_w_password_match_w_after_edit_url(self):
('email', NEW_EMAIL),
('old_password', 'old_password'),
('__start__', 'password:mapping'),
- ('value', 'newpassword'),
- ('confirm', 'newpassword'),
+ ('password', 'newpassword'),
+ ('password-confirm', 'newpassword'),
('__end__', 'password:mapping'),
('__start__', 'security:mapping'),
('question', 'petname'),
Please sign in to comment.
Something went wrong with that request. Please try again.