Implemented SNS.SetSMSAttributes & SNS.GetSMSAttributes + Filtering

TODO:
AddPermission / RemovePermission
CheckIfPhoneNumberIsOptedOut
ConfirmSubscription
ListPhoneNumbersOptedOut
OptInPhoneNumber
This commit is contained in:
Terry Cain 2017-09-19 22:48:46 +01:00
commit 57d94d56c3
No known key found for this signature in database
GPG key ID: 14D90844E4E9B9F3
3 changed files with 102 additions and 0 deletions

View file

@ -172,12 +172,16 @@ class SNSBackend(BaseBackend):
self.applications = {}
self.platform_endpoints = {}
self.region_name = region_name
self.sms_attributes = {}
def reset(self):
region_name = self.region_name
self.__dict__ = {}
self.__init__(region_name)
def update_sms_attributes(self, attrs):
self.sms_attributes.update(attrs)
def create_topic(self, name):
topic = Topic(name, self)
self.topics[topic.arn] = topic