Add informations in subscriptions attributes

This commit is contained in:
Ivan Dromigny 2019-10-02 18:06:34 +02:00
parent 4497f18c1a
commit 83c8740b91

View File

@ -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