Skip to content

Commit

Permalink
Accomodate deform 0.9.4 bugfix for checked input widgets.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Jul 25, 2012
1 parent ae34f38 commit 97463e4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions cartouche/tests/test_registration.py
Expand Up @@ -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'
Expand All @@ -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)]
Expand All @@ -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'
Expand All @@ -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)]
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 97463e4

Please sign in to comment.