Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit a94e85a

Browse files
committed
work in review suggestions
1 parent fad756d commit a94e85a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/aws/services/sns/test_sns.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from localstack.services.sns.constants import (
3333
PLATFORM_ENDPOINT_MSGS_ENDPOINT,
3434
SMS_MSGS_ENDPOINT,
35+
SMS_PHONE_NUMBER_OPT_OUT_ENDPOINT,
3536
SUBSCRIPTION_TOKENS_ENDPOINT,
3637
)
3738
from localstack.testing.aws.util import is_aws_cloud
@@ -4981,14 +4982,16 @@ def cleanup_store():
49814982
snapshot.match("opt-in-phone-number", response)
49824983

49834984
@markers.aws.only_localstack
4985+
@markers.requires_in_process
49844986
@pytest.mark.skipif(is_sns_v1_provider(), reason="Not implemented in v1")
49854987
def test_opt_out_phone_number_via_endpoint(
49864988
self, phone_number, aws_client, snapshot, sns_provider, account_id, cleanups
49874989
):
49884990
response = aws_client.sns.check_if_phone_number_is_opted_out(phoneNumber=phone_number)
49894991
assert not response["isOptedOut"]
49904992
data = {"phoneNumber": phone_number, "accountId": account_id}
4991-
requests.post("http://localhost:4566/_aws/sns/phone-opt-outs", data=json.dumps(data))
4993+
phone_url = config.external_service_url() + SMS_PHONE_NUMBER_OPT_OUT_ENDPOINT
4994+
requests.post(phone_url, data=json.dumps(data))
49924995

49934996
response = aws_client.sns.check_if_phone_number_is_opted_out(phoneNumber=phone_number)
49944997
assert response["isOptedOut"]

0 commit comments

Comments
 (0)