Verify activate and login user with sms and email code

This commit is contained in:
Adam Shimali
2016-01-20 15:13:15 +00:00
parent 5924500f3e
commit ca3d3240a6
19 changed files with 269 additions and 134 deletions

View File

@@ -15,7 +15,7 @@ def test_process_register_creates_new_user(app_,
db_session,
mock_send_sms,
mock_send_email,
mocker):
mock_register_user):
user_data = {
'name': 'Some One Valid',
'email_address': 'someone@example.gov.uk',
@@ -23,8 +23,6 @@ def test_process_register_creates_new_user(app_,
'password': 'validPassword!'
}
mock_user(mocker, user_data)
with app_.test_request_context():
response = app_.test_client().post('/register',
data=user_data)
@@ -67,7 +65,7 @@ def test_should_add_verify_codes_on_session(app_,
db_session,
mock_send_sms,
mock_send_email,
mocker):
mock_register_user):
user_data = {
'name': 'Test Codes',
'email_address': 'test@example.gov.uk',
@@ -75,7 +73,6 @@ def test_should_add_verify_codes_on_session(app_,
'password': 'validPassword!'
}
mock_user(mocker, user_data)
with app_.test_client() as client:
response = client.post('/register',
data=user_data)