diff --git a/app/celery/tasks.py b/app/celery/tasks.py index 1be4afb48..d979f4aa7 100644 --- a/app/celery/tasks.py +++ b/app/celery/tasks.py @@ -37,6 +37,6 @@ def send_sms_code(encrypted_notification): notification = encryption.decrypt(encrypted_notification) try: - twilio_client.send_sms(notification['to'], notification['secret_code']) - except TwilioClientException as e: + firetext_client.send_sms(notification['to'], notification['secret_code']) + except FiretextClientException as e: current_app.logger.debug(e) diff --git a/tests/app/celery/test_tasks.py b/tests/app/celery/test_tasks.py index 4bcdf452c..93d7c4157 100644 --- a/tests/app/celery/test_tasks.py +++ b/tests/app/celery/test_tasks.py @@ -85,16 +85,16 @@ def test_should_send_sms_code(mocker): encrypted_notification = encryption.encrypt(notification) - mocker.patch('app.twilio_client.send_sms') + mocker.patch('app.firetext_client.send_sms') send_sms_code(encrypted_notification) - twilio_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code']) + firetext_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code']) -def test_should_throw_twilio_exception(mocker): +def test_should_log_firetext_client_exception(mocker): notification = {'to': '+441234123123', 'secret_code': '12345'} encrypted_notification = encryption.encrypt(notification) - mocker.patch('app.twilio_client.send_sms', side_effect=TwilioClientException) + mocker.patch('app.firetext_client.send_sms', side_effect=FiretextClientException) send_sms_code(encrypted_notification) - twilio_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code']) + firetext_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code'])