From f41bc64829122a003bbd8ec51952eb8d9c01c6d7 Mon Sep 17 00:00:00 2001 From: 650elx Date: Thu, 12 Dec 2024 20:25:44 +0100 Subject: [PATCH] sms_origin_with_service_plan_id made public --- sinch/core/clients/sinch_client_configuration.py | 2 +- sinch/domains/sms/endpoints/sms_endpoint.py | 2 +- tests/conftest.py | 2 +- tests/integration/test_sms_endpoint_credendials_formatting.py | 2 +- tests/unit/test_configuration.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sinch/core/clients/sinch_client_configuration.py b/sinch/core/clients/sinch_client_configuration.py index 2338749..ca22137 100644 --- a/sinch/core/clients/sinch_client_configuration.py +++ b/sinch/core/clients/sinch_client_configuration.py @@ -66,7 +66,7 @@ def __init__( self.logger = logging.getLogger("Sinch") def _set_sms_origin_with_service_plan_id(self): - self._sms_origin_with_service_plan_id = self._sms_domain_with_service_plan_id.format(self._sms_region) + self.sms_origin_with_service_plan_id = self._sms_domain_with_service_plan_id.format(self._sms_region) def _set_sms_region_with_service_plan_id(self, region): self._sms_region = region diff --git a/sinch/domains/sms/endpoints/sms_endpoint.py b/sinch/domains/sms/endpoints/sms_endpoint.py index f678711..89bcb83 100644 --- a/sinch/domains/sms/endpoints/sms_endpoint.py +++ b/sinch/domains/sms/endpoints/sms_endpoint.py @@ -12,7 +12,7 @@ def __init__(self, request_data, sinch): if sinch.configuration.service_plan_id: self.project_or_service_id = sinch.configuration.service_plan_id self.HTTP_AUTHENTICATION = HTTPAuthentication.SMS_TOKEN.value - self.sms_origin = self.sinch.configuration._sms_origin_with_service_plan_id + self.sms_origin = self.sinch.configuration.sms_origin_with_service_plan_id else: self.project_or_service_id = sinch.configuration.project_id diff --git a/tests/conftest.py b/tests/conftest.py index 7036a44..d1cc442 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -61,7 +61,7 @@ def configure_origin( if sms_origin: sinch_client.configuration.sms_origin = sms_origin - sinch_client.configuration._sms_origin_with_service_plan_id = sms_origin + sinch_client.configuration.sms_origin_with_service_plan_id = sms_origin if verification_origin: sinch_client.configuration.verification_origin = verification_origin diff --git a/tests/integration/test_sms_endpoint_credendials_formatting.py b/tests/integration/test_sms_endpoint_credendials_formatting.py index 70fd6e1..4c8a015 100644 --- a/tests/integration/test_sms_endpoint_credendials_formatting.py +++ b/tests/integration/test_sms_endpoint_credendials_formatting.py @@ -10,7 +10,7 @@ def test_sms_endpoint_service_plan_id_credentials_processing(sinch_client_sync_w assert sms_endpoint.project_or_service_id == service_plan_id assert sms_endpoint.HTTP_AUTHENTICATION == HTTPAuthentication.SMS_TOKEN.value assert ( - sms_endpoint.sms_origin == sinch_client_sync_with_service_plan_id.configuration._sms_origin_with_service_plan_id + sms_endpoint.sms_origin == sinch_client_sync_with_service_plan_id.configuration.sms_origin_with_service_plan_id ) diff --git a/tests/unit/test_configuration.py b/tests/unit/test_configuration.py index 0071ea4..7a1e359 100644 --- a/tests/unit/test_configuration.py +++ b/tests/unit/test_configuration.py @@ -30,7 +30,7 @@ def test_set_sms_region_with_service_plan_id_property_and_check_that_sms_origin_ sinch_client_sync.configuration.sms_region_with_service_plan_id = ( "Herring" ) - assert sinch_client_sync.configuration._sms_origin_with_service_plan_id.startswith("Herring") + assert sinch_client_sync.configuration.sms_origin_with_service_plan_id.startswith("Herring") def test_set_sms_domain_property_and_check_that_sms_origin_was_updated(sinch_client_sync):