From 77b76ea0a497ba1ce236beaa0f28ac2b08b78fc8 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Wed, 17 Feb 2021 13:15:29 +0000 Subject: [PATCH] Rename variable, it's a better name now. --- app/config.py | 2 +- app/user/rest.py | 4 ++-- migrations/versions/0346_notify_number_sms_sender.py | 2 +- tests/app/user/test_rest.py | 2 +- tests/app/user/test_rest_verify.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/config.py b/app/config.py index e9307c94e..f3de3baaf 100644 --- a/app/config.py +++ b/app/config.py @@ -179,7 +179,7 @@ class Config(object): MOU_SIGNED_ON_BEHALF_SIGNER_RECEIPT_TEMPLATE_ID = 'c20206d5-bf03-4002-9a90-37d5032d9e84' MOU_SIGNED_ON_BEHALF_ON_BEHALF_RECEIPT_TEMPLATE_ID = '522b6657-5ca5-4368-a294-6b527703bd0b' MOU_NOTIFY_TEAM_ALERT_TEMPLATE_ID = 'd0e66c4c-0c50-43f0-94f5-f85b613202d4' - NOTIFY_NUMBER_SMS_SENDER = '07984404008' + NOTIFY_INTERNATIONAL_SMS_SENDER = '07984404008' BROKER_URL = 'sqs://' BROKER_TRANSPORT_OPTIONS = { diff --git a/app/user/rest.py b/app/user/rest.py index 81644aa71..32aa7b532 100644 --- a/app/user/rest.py +++ b/app/user/rest.py @@ -108,7 +108,7 @@ def update_user_attribute(user_id): if is_uk_phone_number(recipient): reply_to = template.service.get_default_sms_sender() else: - reply_to = current_app.config['NOTIFY_NUMBER_SMS_SENDER'] + reply_to = current_app.config['NOTIFY_INTERNATIONAL_SMS_SENDER'] else: return jsonify(data=user_to_update.serialize()), 200 service = Service.query.get(current_app.config['NOTIFY_SERVICE_ID']) @@ -274,7 +274,7 @@ def create_2fa_code(template_id, user_to_send_to, secret_code, recipient, person if is_uk_phone_number(recipient): reply_to = template.service.get_default_sms_sender() else: - reply_to = current_app.config['NOTIFY_NUMBER_SMS_SENDER'] + reply_to = current_app.config['NOTIFY_INTERNATIONAL_SMS_SENDER'] elif template.template_type == EMAIL_TYPE: reply_to = template.service.get_default_reply_to_email_address() saved_notification = persist_notification( diff --git a/migrations/versions/0346_notify_number_sms_sender.py b/migrations/versions/0346_notify_number_sms_sender.py index 73d990e37..fca7ddbcd 100644 --- a/migrations/versions/0346_notify_number_sms_sender.py +++ b/migrations/versions/0346_notify_number_sms_sender.py @@ -15,7 +15,7 @@ down_revision = '0345_move_broadcast_provider' SMS_SENDER_ID = 'd24b830b-57b4-4f14-bd80-02f46f8d54de' NOTIFY_SERVICE_ID = current_app.config['NOTIFY_SERVICE_ID'] -INBOUND_NUMBER = current_app.config['NOTIFY_NUMBER_SMS_SENDER'] +INBOUND_NUMBER = current_app.config['NOTIFY_INTERNATIONAL_SMS_SENDER'] def upgrade(): diff --git a/tests/app/user/test_rest.py b/tests/app/user/test_rest.py index 81299cb1f..64ad80d15 100644 --- a/tests/app/user/test_rest.py +++ b/tests/app/user/test_rest.py @@ -329,7 +329,7 @@ def test_post_user_attribute_with_updated_by_sends_notification_to_international assert resp.status_code == 200, resp.get_data(as_text=True) notification = Notification.query.first() - assert notification.reply_to_text == current_app.config['NOTIFY_NUMBER_SMS_SENDER'] + assert notification.reply_to_text == current_app.config['NOTIFY_INTERNATIONAL_SMS_SENDER'] def test_archive_user(mocker, client, sample_user): diff --git a/tests/app/user/test_rest_verify.py b/tests/app/user/test_rest_verify.py index f32c2cdbc..16661a57f 100644 --- a/tests/app/user/test_rest_verify.py +++ b/tests/app/user/test_rest_verify.py @@ -494,4 +494,4 @@ def test_send_user_2fa_code_sends_from_number_for_international_numbers( assert resp.status_code == 204 notification = Notification.query.first() - assert notification.reply_to_text == current_app.config['NOTIFY_NUMBER_SMS_SENDER'] + assert notification.reply_to_text == current_app.config['NOTIFY_INTERNATIONAL_SMS_SENDER']