From 0f0b2dad3f645232eb24f970cc75da8c3f473405 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 12 Jun 2020 09:15:23 +0100 Subject: [PATCH] Correct whitelist to non-government in test name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See c31264d4c for why ‘whitelist’ should be avoided. The use of whitelist here was not referring to the user-maintained list, but to mean ‘not a government’ email address. This commit renames these tests to make that difference clear. --- tests/app/main/views/test_add_service.py | 4 ++-- tests/app/main/views/test_forgot_password.py | 2 +- tests/app/main/views/test_manage_users.py | 4 ++-- tests/conftest.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/app/main/views/test_add_service.py b/tests/app/main/views/test_add_service.py index 582460468..96147d4db 100644 --- a/tests/app/main/views/test_add_service.py +++ b/tests/app/main/views/test_add_service.py @@ -314,7 +314,7 @@ def test_should_return_form_errors_with_duplicate_service_name_regardless_of_cas ) -def test_non_whitelist_user_cannot_access_create_service_page( +def test_non_government_user_cannot_access_create_service_page( client_request, mock_get_non_govuser, api_nongov_user_active, @@ -327,7 +327,7 @@ def test_non_whitelist_user_cannot_access_create_service_page( ) -def test_non_whitelist_user_cannot_create_service( +def test_non_government_user_cannot_create_service( client_request, mock_get_non_govuser, api_nongov_user_active, diff --git a/tests/app/main/views/test_forgot_password.py b/tests/app/main/views/test_forgot_password.py index c28c14430..c75f83210 100644 --- a/tests/app/main/views/test_forgot_password.py +++ b/tests/app/main/views/test_forgot_password.py @@ -15,7 +15,7 @@ def test_should_render_forgot_password(client): @pytest.mark.parametrize('email_address', [ 'test@user.gov.uk', - 'someuser@notonwhitelist.com' + 'someuser@notgovernment.com' ]) def test_should_redirect_to_password_reset_sent_for_valid_email( client, diff --git a/tests/app/main/views/test_manage_users.py b/tests/app/main/views/test_manage_users.py index 36095e59b..eeca85f48 100644 --- a/tests/app/main/views/test_manage_users.py +++ b/tests/app/main/views/test_manage_users.py @@ -684,7 +684,7 @@ def test_should_show_folder_permission_form_if_service_has_folder_permissions_en @pytest.mark.parametrize('email_address, gov_user', [ ('test@example.gov.uk', True), - ('test@nonwhitelist.com', False) + ('test@example.com', False) ]) def test_invite_user( client_request, @@ -735,7 +735,7 @@ def test_invite_user( ]) @pytest.mark.parametrize('email_address, gov_user', [ ('test@example.gov.uk', True), - ('test@nonwhitelist.com', False) + ('test@example.com', False) ]) def test_invite_user_with_email_auth_service( client_request, diff --git a/tests/conftest.py b/tests/conftest.py index b819c457e..daaeec0cb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1152,7 +1152,7 @@ def api_nongov_user_active(fake_uuid): 'id': fake_uuid, 'name': 'Test User', 'password': 'somepassword', - 'email_address': 'someuser@notonwhitelist.com', + 'email_address': 'someuser@example.com', 'mobile_number': '07700 900762', 'state': 'active', 'failed_login_count': 0, @@ -1414,7 +1414,7 @@ def mock_register_user(mocker, api_user_pending): @pytest.fixture(scope='function') def mock_get_non_govuser(mocker, api_user_active): - api_user_active['email_address'] = 'someuser@notonwhitelist.com' + api_user_active['email_address'] = 'someuser@example.com' def _get_user(id_): api_user_active['id'] = id_