mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Verify activate and login user with sms and email code
This commit is contained in:
@@ -4,7 +4,8 @@ from flask import url_for
|
||||
import moto
|
||||
|
||||
|
||||
def test_upload_empty_csvfile_returns_to_upload_page(app_, db_, db_session, active_user):
|
||||
def test_upload_empty_csvfile_returns_to_upload_page(app_, db_, db_session, active_user,
|
||||
mock_user_loader):
|
||||
with app_.test_request_context():
|
||||
with app_.test_client() as client:
|
||||
client.login(active_user)
|
||||
@@ -22,7 +23,8 @@ def test_upload_csvfile_with_invalid_phone_shows_check_page_with_errors(app_,
|
||||
db_,
|
||||
db_session,
|
||||
mocker,
|
||||
active_user):
|
||||
active_user,
|
||||
mock_user_loader):
|
||||
|
||||
contents = 'phone\n+44 123\n+44 456'
|
||||
file_data = (BytesIO(contents.encode('utf-8')), 'invalid.csv')
|
||||
@@ -47,7 +49,8 @@ def test_upload_csvfile_with_valid_phone_shows_first3_and_last3_numbers(app_,
|
||||
db_,
|
||||
db_session,
|
||||
mocker,
|
||||
active_user):
|
||||
active_user,
|
||||
mock_user_loader):
|
||||
|
||||
contents = 'phone\n+44 7700 900981\n+44 7700 900982\n+44 7700 900983\n+44 7700 900984\n+44 7700 900985\n+44 7700 900986\n+44 7700 900987\n+44 7700 900988\n+44 7700 900989' # noqa
|
||||
|
||||
@@ -83,7 +86,8 @@ def test_upload_csvfile_with_valid_phone_shows_all_if_6_or_less_numbers(app_,
|
||||
db_,
|
||||
db_session,
|
||||
mocker,
|
||||
active_user):
|
||||
active_user,
|
||||
mock_user_loader):
|
||||
|
||||
contents = 'phone\n+44 7700 900981\n+44 7700 900982\n+44 7700 900983\n+44 7700 900984\n+44 7700 900985\n+44 7700 900986' # noqa
|
||||
|
||||
@@ -111,7 +115,7 @@ def test_upload_csvfile_with_valid_phone_shows_all_if_6_or_less_numbers(app_,
|
||||
|
||||
|
||||
@moto.mock_s3
|
||||
def test_should_redirect_to_job(app_, db_, db_session, mocker, active_user):
|
||||
def test_should_redirect_to_job(app_, db_, db_session, mocker, active_user, mock_user_loader):
|
||||
with app_.test_request_context():
|
||||
with app_.test_client() as client:
|
||||
client.login(active_user)
|
||||
|
||||
Reference in New Issue
Block a user