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

Commit b613fb9

Browse files
authored
fix: replace hardcoded region in SNS test (#13542)
1 parent 033f449 commit b613fb9

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/aws/services/sns/test_sns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def test_remove_permission_errors(self, snapshot, aws_client, account_id):
609609

610610
@markers.aws.validated
611611
@pytest.mark.skipif(condition=is_sns_v1_provider(), reason="Not implemented in moto")
612-
def test_data_protection_policy_crud(self, snapshot, aws_client):
612+
def test_data_protection_policy_crud(self, snapshot, aws_client, region_name):
613613
topic_name = f"topic-{short_uid()}"
614614
topic_arn = aws_client.sns.create_topic(Name=topic_name)["TopicArn"]
615615

@@ -623,7 +623,7 @@ def test_data_protection_policy_crud(self, snapshot, aws_client):
623623
"DataDirection": "Inbound",
624624
"Principal": ["*"],
625625
"DataIdentifier": [
626-
"arn:aws:dataprotection:us-east-1::data-identifier/EmailAddress"
626+
f"arn:aws:dataprotection:{region_name}::data-identifier/EmailAddress"
627627
],
628628
"Operation": {"Deny": {}},
629629
}

tests/aws/services/sns/test_sns.snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7030,7 +7030,7 @@
70307030
}
70317031
},
70327032
"tests/aws/services/sns/test_sns.py::TestSNSTopicCrudV2::test_data_protection_policy_crud": {
7033-
"recorded-date": "17-12-2025, 13:06:58",
7033+
"recorded-date": "18-12-2025, 07:54:08",
70347034
"recorded-content": {
70357035
"get-topic-attributes-before-policy": {
70367036
"Attributes": {

tests/aws/services/sns/test_sns.validation.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,12 +1353,12 @@
13531353
}
13541354
},
13551355
"tests/aws/services/sns/test_sns.py::TestSNSTopicCrudV2::test_data_protection_policy_crud": {
1356-
"last_validated_date": "2025-12-17T13:06:58+00:00",
1356+
"last_validated_date": "2025-12-18T07:54:08+00:00",
13571357
"durations_in_seconds": {
1358-
"setup": 1.14,
1359-
"call": 2.36,
1360-
"teardown": 0.02,
1361-
"total": 3.52
1358+
"setup": 0.84,
1359+
"call": 1.82,
1360+
"teardown": 0.04,
1361+
"total": 2.7
13621362
}
13631363
},
13641364
"tests/aws/services/sns/test_sns.py::TestSNSTopicCrudV2::test_delete_non_existent_topic": {

0 commit comments

Comments
 (0)