Merge branch 'master' of https://github.com/alphagov/notifications-api into raise-alert-when-no-ack-file

This commit is contained in:
venusbb
2018-01-16 16:20:40 +00:00
6 changed files with 74 additions and 13 deletions

View File

@@ -347,6 +347,13 @@ def test_allows_api_calls_with_international_numbers_if_service_does_allow_int_s
assert result == '201212341234'
def test_rejects_api_calls_with_no_recipient():
with pytest.raises(BadRequestError) as e:
validate_and_format_recipient(None, 'key_type', 'service', 'SMS_TYPE')
assert e.value.status_code == 400
assert e.value.message == "Recipient can't be empty"
@pytest.mark.parametrize('notification_type', ['sms', 'email', 'letter'])
def test_check_service_email_reply_to_id_where_reply_to_id_is_none(notification_type):
assert check_service_email_reply_to_id(None, None, notification_type) is None