From 83c8740b910e178d93fc26b02d3557d4ad36bbd3 Mon Sep 17 00:00:00 2001 From: Ivan Dromigny Date: Wed, 2 Oct 2019 18:06:34 +0200 Subject: [PATCH] Add informations in subscriptions `attributes` --- moto/sns/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/moto/sns/models.py b/moto/sns/models.py index 92e6c61de..515fe116d 100644 --- a/moto/sns/models.py +++ b/moto/sns/models.py @@ -339,6 +339,14 @@ class SNSBackend(BaseBackend): return old_subscription topic = self.get_topic(topic_arn) subscription = Subscription(topic, endpoint, protocol) + attributes = { + 'PendingConfirmation' : 'false', + 'Endpoint' : endpoint, + 'TopicArn' : topic_arn, + 'Protocol': protocol, + 'SubscriptionArn': subscription.arn + } + subscription.attributes = attributes self.subscriptions[subscription.arn] = subscription return subscription