Remove existing whitespace stripping code

Since we’re doing this globally, we don’t need to handle it in a custom
way for the sign in form (and it’s much nicer encapsulated like this).

Also added some more extensive tests in this commit.
This commit is contained in:
Chris Hill-Scott
2017-12-11 16:09:19 +00:00
parent 70badae575
commit d0d230f119
3 changed files with 12 additions and 8 deletions

View File

@@ -39,6 +39,10 @@ def test_logged_in_user_redirects_to_choose_service(
'+4407700900460',
'+1800-555-555',
])
@pytest.mark.parametrize('password', [
'the quick brown fox',
' the quick brown fox ',
])
def test_register_creates_new_user_and_redirects_to_continue_page(
client,
mock_send_verify_code,
@@ -48,11 +52,12 @@ def test_register_creates_new_user_and_redirects_to_continue_page(
mock_send_verify_email,
mock_login,
phone_number_to_register_with,
password,
):
user_data = {'name': 'Some One Valid',
'email_address': 'notfound@example.gov.uk',
'mobile_number': phone_number_to_register_with,
'password': 'validPassword!',
'password': password,
'auth_type': 'sms_auth'
}