diff --git a/app/main/views/two_factor.py b/app/main/views/two_factor.py index e4a17d522..31864075c 100644 --- a/app/main/views/two_factor.py +++ b/app/main/views/two_factor.py @@ -66,7 +66,6 @@ def two_factor_email(token): return log_in_user(user_id) -@main.route('/two-factor', methods=['GET', 'POST']) @main.route('/two-factor-sms', methods=['GET', 'POST']) @redirect_to_sign_in def two_factor_sms(): diff --git a/tests/app/main/views/test_two_factor.py b/tests/app/main/views/test_two_factor.py index 5d5111755..03508c426 100644 --- a/tests/app/main/views/test_two_factor.py +++ b/tests/app/main/views/test_two_factor.py @@ -212,7 +212,7 @@ def test_should_login_user_when_multiple_valid_codes_exist( assert response.status_code == 302 -def test_two_factor_should_set_password_when_new_password_exists_in_session( +def test_two_factor_sms_should_set_password_when_new_password_exists_in_session( client, api_user_active, mock_get_user, @@ -238,7 +238,7 @@ def test_two_factor_should_set_password_when_new_password_exists_in_session( ) -def test_two_factor_returns_error_when_user_is_locked( +def test_two_factor_sms_returns_error_when_user_is_locked( client, api_user_locked, mock_get_locked_user, @@ -256,7 +256,7 @@ def test_two_factor_returns_error_when_user_is_locked( assert 'Code not found' in response.get_data(as_text=True) -def test_two_factor_post_should_redirect_to_sign_in_if_user_not_in_session( +def test_two_factor_sms_post_should_redirect_to_sign_in_if_user_not_in_session( client_request, ): client_request.post( @@ -267,7 +267,7 @@ def test_two_factor_post_should_redirect_to_sign_in_if_user_not_in_session( @pytest.mark.parametrize('endpoint', ['main.two_factor_webauthn', 'main.two_factor_sms']) -def test_two_factor_get_should_redirect_to_sign_in_if_user_not_in_session( +def test_two_factor_endpoints_get_should_redirect_to_sign_in_if_user_not_in_session( client_request, endpoint, ): @@ -327,7 +327,7 @@ def test_two_factor_webauthn_should_reject_non_webauthn_auth_users( assert response.status_code == 403 -def test_two_factor_should_activate_pending_user( +def test_two_factor_sms_should_activate_pending_user( client, mocker, api_user_pending,