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

Commit aa59f83

Browse files
committed
SES: add snapshot test for describe_configuration_set with SNS destinations
Related to issue #12722 Requires getmoto/moto#9023
1 parent 31209be commit aa59f83

3 files changed

Lines changed: 70 additions & 0 deletions

File tree

tests/aws/services/ses/test_ses.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,37 @@ def _assert_sent_quota(expected_counter: int) -> dict:
287287
_ = retry(_assert_sent_quota, expected_counter=counter + 1, retries=retries, sleep=1)
288288
# snapshot.match('get-quota-3', _)
289289

290+
@markers.aws.validated
291+
def test_describe_config_set_event_destinations(
292+
self,
293+
aws_client,
294+
sns_topic,
295+
ses_configuration_set,
296+
ses_configuration_set_sns_event_destination,
297+
snapshot,
298+
):
299+
config_set_name = f"config-set-{short_uid()}"
300+
snapshot.add_transformer(snapshot.transform.regex(config_set_name, "<config-set-name>"))
301+
302+
topic_arn = sns_topic["Attributes"]["TopicArn"]
303+
snapshot.add_transformer(snapshot.transform.regex(topic_arn, "<arn>"))
304+
305+
ses_configuration_set(config_set_name)
306+
event_destination_name = f"config-set-event-destination-{short_uid()}"
307+
snapshot.add_transformer(
308+
snapshot.transform.regex(event_destination_name, "<event-destination-name>")
309+
)
310+
311+
ses_configuration_set_sns_event_destination(
312+
config_set_name, event_destination_name, topic_arn
313+
)
314+
315+
response = aws_client.ses.describe_configuration_set(
316+
ConfigurationSetName=config_set_name,
317+
ConfigurationSetAttributeNames=["eventDestinations"],
318+
)
319+
snapshot.match("event_destinations", response)
320+
290321
@markers.aws.validated
291322
@markers.snapshot.skip_snapshot_verify(
292323
paths=[

tests/aws/services/ses/test_ses.snapshot.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,5 +1081,35 @@
10811081
}
10821082
}
10831083
}
1084+
},
1085+
"tests/aws/services/ses/test_ses.py::TestSES::test_describe_config_set_event_destinations": {
1086+
"recorded-date": "20-08-2025, 12:00:48",
1087+
"recorded-content": {
1088+
"event_destinations": {
1089+
"ConfigurationSet": {
1090+
"Name": "<config-set-name>"
1091+
},
1092+
"EventDestinations": [
1093+
{
1094+
"Enabled": true,
1095+
"MatchingEventTypes": [
1096+
"bounce",
1097+
"click",
1098+
"delivery",
1099+
"open",
1100+
"send"
1101+
],
1102+
"Name": "<event-destination-name>",
1103+
"SNSDestination": {
1104+
"TopicARN": "<arn>"
1105+
}
1106+
}
1107+
],
1108+
"ResponseMetadata": {
1109+
"HTTPHeaders": {},
1110+
"HTTPStatusCode": 200
1111+
}
1112+
}
1113+
}
10841114
}
10851115
}

tests/aws/services/ses/test_ses.validation.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
"tests/aws/services/ses/test_ses.py::TestSES::test_deleting_non_existent_configuration_set_event_destination": {
1818
"last_validated_date": "2023-08-25T22:04:53+00:00"
1919
},
20+
"tests/aws/services/ses/test_ses.py::TestSES::test_describe_config_set_event_destinations": {
21+
"last_validated_date": "2025-08-20T12:00:48+00:00",
22+
"durations_in_seconds": {
23+
"setup": 2.09,
24+
"call": 1.15,
25+
"teardown": 0.58,
26+
"total": 3.82
27+
}
28+
},
2029
"tests/aws/services/ses/test_ses.py::TestSES::test_invalid_tags_send_email[-]": {
2130
"last_validated_date": "2024-07-30T10:18:09+00:00"
2231
},

0 commit comments

Comments
 (0)