Apply suggestions from code review

Better grammar for our new error message.

Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
This commit is contained in:
Pea M. Tyczynska
2020-02-26 10:40:12 +00:00
committed by Pea Tyczynska
parent 9a12d0e80e
commit 6d21515adf
2 changed files with 3 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ def check_service_has_permission(notify_type, permissions):
def check_if_service_can_send_files_by_email(service_contact_link): def check_if_service_can_send_files_by_email(service_contact_link):
if not service_contact_link: if not service_contact_link:
raise BadRequestError( 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."
) )

View File

@@ -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: with pytest.raises(BadRequestError) as e:
check_if_service_can_send_files_by_email(sample_service.contact_link) 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.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): def test_check_if_service_can_send_files_by_email_passes_if_contact_link_set(sample_service):