Skip to content

Commit

Permalink
sms_origin_with_service_plan_id made public
Browse files Browse the repository at this point in the history
650elx committed Dec 12, 2024
1 parent 35da17a commit f41bc64
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sinch/core/clients/sinch_client_configuration.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion sinch/domains/sms/endpoints/sms_endpoint.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
)


2 changes: 1 addition & 1 deletion tests/unit/test_configuration.py
Original file line number Diff line number Diff line change
@@ -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):

0 comments on commit f41bc64

Please sign in to comment.