diff --git a/sinch/core/clients/sinch_client_configuration.py b/sinch/core/clients/sinch_client_configuration.py index 59e3712..2338749 100644 --- a/sinch/core/clients/sinch_client_configuration.py +++ b/sinch/core/clients/sinch_client_configuration.py @@ -45,7 +45,7 @@ def __init__( self._conversation_domain = ".conversation.api.sinch.com" self._sms_region = "us" self._sms_domain = "zt.{}.sms.api.sinch.com" - self._sms_domain_with_service_plan_id = "sms.api.sinch.com" + self._sms_domain_with_service_plan_id = "{}.sms.api.sinch.com" self._sms_authentication = HTTPAuthentication.OAUTH.value self._templates_region = "eu" self._templates_domain = ".template.api.sinch.com" diff --git a/tests/unit/test_configuration.py b/tests/unit/test_configuration.py index fb83355..5a52fe8 100644 --- a/tests/unit/test_configuration.py +++ b/tests/unit/test_configuration.py @@ -26,6 +26,13 @@ def test_set_sms_region_property_and_check_that_sms_origin_was_updated(sinch_cli assert "irritating" in sinch_client_sync.configuration.sms_origin +def test_set_sms_region_with_service_plan_id_property_and_check_that_sms_origin_was_updated(sinch_client_sync): + sinch_client_sync.configuration.sms_region_with_service_plan_id = ( + "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): sinch_client_sync.configuration.sms_region = ( "We interrupt this program to annoy you"