mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Only return non-archived email reply_to addresses
Updated the DAO methods which return a single email reply_to address and all reply_to addresses to only return the non-archived addresses. Changed the type of error that gets raised when using the Admin interface to be BadRequestError instead of a SQLAlchemyError.
This commit is contained in:
@@ -319,8 +319,9 @@ def test_send_one_off_notification_should_throw_exception_if_reply_to_id_doesnot
|
||||
'created_by': str(sample_email_template.service.created_by_id)
|
||||
}
|
||||
|
||||
with pytest.raises(expected_exception=SQLAlchemyError):
|
||||
with pytest.raises(expected_exception=BadRequestError) as e:
|
||||
send_one_off_notification(service_id=sample_email_template.service.id, post_data=data)
|
||||
assert e.value.message == 'Reply to email address not found'
|
||||
|
||||
|
||||
def test_send_one_off_notification_should_throw_exception_if_sms_sender_id_doesnot_exist(
|
||||
|
||||
Reference in New Issue
Block a user