Skip to content

Commit

Permalink
test(SMS): sms region property test added
Browse files Browse the repository at this point in the history
650elx committed Nov 19, 2024
1 parent 519d4cb commit f963f4c
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sinch/core/clients/sinch_client_configuration.py
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 7 additions & 0 deletions tests/unit/test_configuration.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit f963f4c

Please sign in to comment.