Implemented SNS.SetSMSAttributes & SNS.GetSMSAttributes + Filtering
TODO: AddPermission / RemovePermission CheckIfPhoneNumberIsOptedOut ConfirmSubscription ListPhoneNumbersOptedOut OptInPhoneNumber
This commit is contained in:
parent
d2717ac371
commit
57d94d56c3
3 changed files with 102 additions and 0 deletions
32
tests/test_sns/test_sms_boto3.py
Normal file
32
tests/test_sns/test_sms_boto3.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from __future__ import unicode_literals
|
||||
import boto3
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_sns
|
||||
|
||||
|
||||
@mock_sns
|
||||
def test_set_sms_attributes():
|
||||
conn = boto3.client('sns', region_name='us-east-1')
|
||||
|
||||
conn.set_sms_attributes(attributes={'DefaultSMSType': 'Transactional', 'test': 'test'})
|
||||
|
||||
response = conn.get_sms_attributes()
|
||||
response.should.contain('attributes')
|
||||
response['attributes'].should.contain('DefaultSMSType')
|
||||
response['attributes'].should.contain('test')
|
||||
response['attributes']['DefaultSMSType'].should.equal('Transactional')
|
||||
response['attributes']['test'].should.equal('test')
|
||||
|
||||
|
||||
@mock_sns
|
||||
def test_get_sms_attributes_filtered():
|
||||
conn = boto3.client('sns', region_name='us-east-1')
|
||||
|
||||
conn.set_sms_attributes(attributes={'DefaultSMSType': 'Transactional', 'test': 'test'})
|
||||
|
||||
response = conn.get_sms_attributes(attributes=['DefaultSMSType'])
|
||||
response.should.contain('attributes')
|
||||
response['attributes'].should.contain('DefaultSMSType')
|
||||
response['attributes'].should_not.contain('test')
|
||||
response['attributes']['DefaultSMSType'].should.equal('Transactional')
|
||||
Loading…
Add table
Add a link
Reference in a new issue