From 7ca35b44a71835c930e1de304a2526ee339df440 Mon Sep 17 00:00:00 2001 From: "Pea M. Tyczynska" Date: Wed, 26 Feb 2020 10:40:12 +0000 Subject: [PATCH] Our new error message now has better grammar and form matching other errors more Co-Authored-By: karlchillmaid --- app/notifications/validators.py | 2 +- tests/app/notifications/test_validators.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/notifications/validators.py b/app/notifications/validators.py index 5e5bf8ce0..25d6583e1 100644 --- a/app/notifications/validators.py +++ b/app/notifications/validators.py @@ -92,7 +92,7 @@ def check_service_has_permission(notify_type, permissions): def check_if_service_can_send_files_by_email(service_contact_link): if not service_contact_link: raise BadRequestError( - message="Send files by email is not set up yet. Go to your settings page to manage send files by email" + message="Send files by email has not been set up - go to your Settings page to manage Send files by email." ) diff --git a/tests/app/notifications/test_validators.py b/tests/app/notifications/test_validators.py index b6405f0e9..173c704af 100644 --- a/tests/app/notifications/test_validators.py +++ b/tests/app/notifications/test_validators.py @@ -535,9 +535,9 @@ def test_check_if_service_can_send_files_by_email_raises_if_no_contact_link_set( with pytest.raises(BadRequestError) as e: check_if_service_can_send_files_by_email(sample_service.contact_link) - expected_message = "Send files by email is not set up yet. Go to your settings page to manage send files by email" + message = "Send files by email has not been set up - go to your Settings page to manage Send files by email." assert e.value.status_code == 400 - assert e.value.message == expected_message + assert e.value.message == message def test_check_if_service_can_send_files_by_email_passes_if_contact_link_set(sample_service):