mirror of
https://github.com/GSA/notifications-api.git
synced 2026-06-20 21:20:31 -04:00
Re-label error messages
To reflect the new name of the feature.
This commit is contained in:
@@ -683,9 +683,9 @@ class ServiceGuestList(db.Model):
|
||||
else:
|
||||
raise ValueError('Invalid recipient type')
|
||||
except InvalidPhoneError:
|
||||
raise ValueError('Invalid whitelist: "{}"'.format(recipient))
|
||||
raise ValueError('Invalid guest list: "{}"'.format(recipient))
|
||||
except InvalidEmailError:
|
||||
raise ValueError('Invalid whitelist: "{}"'.format(recipient))
|
||||
raise ValueError('Invalid guest list: "{}"'.format(recipient))
|
||||
else:
|
||||
return instance
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ def test_update_whitelist_doesnt_remove_old_whitelist_if_error(client, sample_se
|
||||
assert response.status_code == 400
|
||||
assert json.loads(response.get_data(as_text=True)) == {
|
||||
'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()
|
||||
assert whitelist.id == sample_service_whitelist.id
|
||||
|
||||
Reference in New Issue
Block a user