mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 16:23:44 -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:
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user