Re-label error messages

To reflect the new name of the feature.
This commit is contained in:
Chris Hill-Scott
2020-07-28 10:23:22 +01:00
parent e41022214f
commit 716eb67bfd
2 changed files with 3 additions and 3 deletions

View File

@@ -683,9 +683,9 @@ class ServiceGuestList(db.Model):
else: else:
raise ValueError('Invalid recipient type') raise ValueError('Invalid recipient type')
except InvalidPhoneError: except InvalidPhoneError:
raise ValueError('Invalid whitelist: "{}"'.format(recipient)) raise ValueError('Invalid guest list: "{}"'.format(recipient))
except InvalidEmailError: except InvalidEmailError:
raise ValueError('Invalid whitelist: "{}"'.format(recipient)) raise ValueError('Invalid guest list: "{}"'.format(recipient))
else: else:
return instance return instance

View File

@@ -98,7 +98,7 @@ def test_update_whitelist_doesnt_remove_old_whitelist_if_error(client, sample_se
assert response.status_code == 400 assert response.status_code == 400
assert json.loads(response.get_data(as_text=True)) == { assert json.loads(response.get_data(as_text=True)) == {
'result': 'error', 'result': 'error',
'message': 'Invalid whitelist: "" is not a valid email address or phone number' 'message': 'Invalid guest list: "" is not a valid email address or phone number'
} }
whitelist = ServiceGuestList.query.one() whitelist = ServiceGuestList.query.one()
assert whitelist.id == sample_service_whitelist.id assert whitelist.id == sample_service_whitelist.id