From 93aed94bc7e8cf4cb4366094c8d450c9c58ddc9f Mon Sep 17 00:00:00 2001 From: Ned Jackson Lovely Date: Thu, 5 May 2016 23:01:24 -0400 Subject: [PATCH] Add sent_messages back to SESBackend --- moto/ses/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/moto/ses/models.py b/moto/ses/models.py index 96271335b..6950ead5b 100644 --- a/moto/ses/models.py +++ b/moto/ses/models.py @@ -33,6 +33,7 @@ class SESBackend(BaseBackend): def __init__(self): self.addresses = [] self.domains = [] + self.sent_messages = [] self.sent_message_count = 0 def _is_verified_address(self, address): @@ -67,6 +68,7 @@ class SESBackend(BaseBackend): message_id = get_random_message_id() message = Message(message_id) + self.sent_messages.append(message) self.sent_message_count += recipient_count return message @@ -88,7 +90,9 @@ class SESBackend(BaseBackend): self.sent_message_count += recipient_count message_id = get_random_message_id() - return RawMessage(message_id) + message = RawMessage(message_id) + self.sent_messages.append(message) + return message def get_send_quota(self): return SESQuota(self.sent_message_count)