|
32 | 32 | from localstack.services.sns.constants import ( |
33 | 33 | PLATFORM_ENDPOINT_MSGS_ENDPOINT, |
34 | 34 | SMS_MSGS_ENDPOINT, |
| 35 | + SMS_PHONE_NUMBER_OPT_OUT_ENDPOINT, |
35 | 36 | SUBSCRIPTION_TOKENS_ENDPOINT, |
36 | 37 | ) |
37 | 38 | from localstack.testing.aws.util import is_aws_cloud |
@@ -4981,14 +4982,16 @@ def cleanup_store(): |
4981 | 4982 | snapshot.match("opt-in-phone-number", response) |
4982 | 4983 |
|
4983 | 4984 | @markers.aws.only_localstack |
| 4985 | + @markers.requires_in_process |
4984 | 4986 | @pytest.mark.skipif(is_sns_v1_provider(), reason="Not implemented in v1") |
4985 | 4987 | def test_opt_out_phone_number_via_endpoint( |
4986 | 4988 | self, phone_number, aws_client, snapshot, sns_provider, account_id, cleanups |
4987 | 4989 | ): |
4988 | 4990 | response = aws_client.sns.check_if_phone_number_is_opted_out(phoneNumber=phone_number) |
4989 | 4991 | assert not response["isOptedOut"] |
4990 | 4992 | 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)) |
4992 | 4995 |
|
4993 | 4996 | response = aws_client.sns.check_if_phone_number_is_opted_out(phoneNumber=phone_number) |
4994 | 4997 | assert response["isOptedOut"] |
|
0 commit comments