Merge pull request #1387 from alphagov/fix-post-notification-response

Update the from number in the response of post notification.
This commit is contained in:
Rebecca Law
2017-11-10 15:12:16 +00:00
committed by GitHub
4 changed files with 5 additions and 4 deletions

View File

@@ -374,7 +374,7 @@ def test_check_service_sms_sender_id_where_sms_sender_id_is_none(notification_ty
def test_check_service_sms_sender_id_where_sms_sender_id_is_found(sample_service):
sms_sender = create_service_sms_sender(service=sample_service, sms_sender='123456')
assert check_service_sms_sender_id(sample_service.id, sms_sender.id, SMS_TYPE) is None
assert check_service_sms_sender_id(sample_service.id, sms_sender.id, SMS_TYPE) == '123456'
def test_check_service_sms_sender_id_where_service_id_is_not_found(sample_service, fake_uuid):

View File

@@ -118,6 +118,7 @@ def test_post_sms_notification_returns_201_with_sms_sender_id(
notification_to_sms_sender = NotificationSmsSender.query.all()
assert len(notification_to_sms_sender) == 1
assert str(notification_to_sms_sender[0].notification_id) == resp_json['id']
assert resp_json['content']['from_number'] == sms_sender.sms_sender
assert notification_to_sms_sender[0].service_sms_sender_id == sms_sender.id
mocked.assert_called_once_with([resp_json['id']], queue='send-sms-tasks')