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

Commit 67618e2

Browse files
committed
SES: add snapshot test for describe_configuration_set with SNS destinations
Related to issue #12722 Requires getmoto/moto#9023
1 parent 05a922a commit 67618e2

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
@@ -288,6 +288,37 @@ def _assert_sent_quota(expected_counter: int) -> dict:
288288
_ = retry(_assert_sent_quota, expected_counter=counter + 1, retries=retries, sleep=1)
289289
# snapshot.match('get-quota-3', _)
290290

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

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,5 +915,35 @@
915915
}
916916
}
917917
}
918+
},
919+
"tests/aws/services/ses/test_ses.py::TestSES::test_describe_config_set_event_destinations": {
920+
"recorded-date": "29-06-2025, 09:05:24",
921+
"recorded-content": {
922+
"event_destinations": {
923+
"ConfigurationSet": {
924+
"Name": "<config-set-name>"
925+
},
926+
"EventDestinations": [
927+
{
928+
"Enabled": true,
929+
"MatchingEventTypes": [
930+
"bounce",
931+
"click",
932+
"delivery",
933+
"open",
934+
"send"
935+
],
936+
"Name": "<event-destination-name>",
937+
"SNSDestination": {
938+
"TopicARN": "<arn>"
939+
}
940+
}
941+
],
942+
"ResponseMetadata": {
943+
"HTTPHeaders": {},
944+
"HTTPStatusCode": 200
945+
}
946+
}
947+
}
918948
}
919949
}

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-06-29T09:05:51+00:00",
22+
"durations_in_seconds": {
23+
"setup": 2.42,
24+
"call": 1.82,
25+
"teardown": 1.05,
26+
"total": 5.29
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)