diff --git a/src/settings.py b/src/settings.py index c82980f..0364dfd 100644 --- a/src/settings.py +++ b/src/settings.py @@ -42,7 +42,7 @@ class Settings(BaseSettings): # Have to use a US number as the originator to send to the US # https://support.messagebird.com/hc/en-us/articles/208747865-United-States us_send_number = '15744445663' - tutorcruncher_number = '12048170659' # TODO placeholder for now + gb_send_number = '12048170659' @validator('pg_dsn') def heroku_ready_pg_dsn(cls, v): diff --git a/src/worker/sms.py b/src/worker/sms.py index 36f7e29..d186d68 100644 --- a/src/worker/sms.py +++ b/src/worker/sms.py @@ -64,9 +64,7 @@ def __init__(self, ctx: dict, group_id: int, company_id: int, recipient: SmsReci self.m: SmsSendModel = m self.tags = list(set(self.recipient.tags + self.m.tags + [str(self.m.uid)])) self.messagebird: MessageBird = ctx['messagebird'] - self.from_name = ( - self.settings.tutorcruncher_number if self.m.country_code != 'US' else self.settings.us_send_number - ) + self.from_name = self.settings.gb_send_number if self.m.country_code != 'US' else self.settings.us_send_number async def run(self): sms_data = await self._sms_prep() diff --git a/tests/test_sms.py b/tests/test_sms.py index 5e4590b..b8c0899 100644 --- a/tests/test_sms.py +++ b/tests/test_sms.py @@ -28,7 +28,7 @@ def test_send_message(cli, tmpdir, worker, loop): "to: Number(number='+447891123856', country_code='44', " "number_formatted='+44 7891 123856', descr=None, is_mobile=True)" ) in msg_file - assert f'\nfrom_name: {settings.tutorcruncher_number}\n' in msg_file + assert f'\nfrom_name: {settings.gb_send_number}\n' in msg_file assert '\nmessage:\nthis is a message bar\n' in msg_file assert '\nlength: SmsLength(length=21, parts=1)\n' in msg_file @@ -325,7 +325,7 @@ def test_link_shortening(cli, tmpdir, sync_db: SyncDb, worker, loop): f = '69eb85e8-1504-40aa-94ff-75bb65fd8d75-447891123856.txt' assert str(tmpdir.listdir()[0]).endswith(f) msg_file = tmpdir.join(f).read() - assert f'\nfrom_name: {settings.tutorcruncher_number}\n' in msg_file + assert f'\nfrom_name: {settings.gb_send_number}\n' in msg_file assert '\nmessage:\nthis is a message click.example.com/l' in msg_file token = re.search('message click.example.com/l(.+?)\n', msg_file).groups()[0] assert len(token) == 12