From a10e76a9c2a7084358b1b8e2b6e4361d71f27e3f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 10 Aug 2017 13:51:46 +0100 Subject: [PATCH] Stop referring to central gov in error messages --- app/main/validators.py | 2 +- tests/app/main/test_validators.py | 2 +- tests/app/main/views/test_register.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main/validators.py b/app/main/validators.py index 42cd29c8d..e183f3d89 100644 --- a/app/main/validators.py +++ b/app/main/validators.py @@ -36,7 +36,7 @@ class ValidGovEmail: def __call__(self, form, field): from flask import url_for message = ( - 'Enter a central government email address.' + 'Enter a government email address.' ' If you think you should have access' ' contact us').format(url_for('main.support')) if not is_gov_user(field.data.lower()): diff --git a/tests/app/main/test_validators.py b/tests/app/main/test_validators.py index e9bf96db2..cfe99b82e 100644 --- a/tests/app/main/test_validators.py +++ b/tests/app/main/test_validators.py @@ -28,7 +28,7 @@ def test_valid_email_not_in_valid_domains( ): form = RegisterUserForm(email_address="test@test.com", mobile_number='441231231231') assert not form.validate() - assert "Enter a central government email address" in form.errors['email_address'][0] + assert "Enter a government email address" in form.errors['email_address'][0] def test_valid_email_in_valid_domains( diff --git a/tests/app/main/views/test_register.py b/tests/app/main/views/test_register.py index 0c339e24d..e2f9c7aa3 100644 --- a/tests/app/main/views/test_register.py +++ b/tests/app/main/views/test_register.py @@ -96,7 +96,7 @@ def test_should_return_200_when_email_is_not_gov_uk( 'password': 'validPassword!'}) assert response.status_code == 200 - assert 'Enter a central government email address' in response.get_data(as_text=True) + assert 'Enter a government email address' in response.get_data(as_text=True) def test_should_add_user_details_to_session(