Add a test

This commit is contained in:
Ivan Dromigny 2019-10-14 18:03:01 +02:00
parent 03986df929
commit 02fc1fbcef

View File

@ -181,6 +181,30 @@ def test_subscription_paging():
int(DEFAULT_PAGE_SIZE / 3))
topic1_subscriptions.shouldnt.have("NextToken")
@mock_sns
def test_subscribe_attributes():
client = boto3.client('sns', region_name='us-east-1')
client.create_topic(Name="some-topic")
resp = client.create_topic(Name="some-topic")
arn = resp['TopicArn']
resp = client.subscribe(
TopicArn=arn,
Protocol='http',
Endpoint='http://test.com'
)
attributes = client.get_subscription_attributes(
SubscriptionArn=resp['SubscriptionArn']
)
attributes.should.contain('Attributes')
attributes['Attributes'].should.contain('PendingConfirmation')
attributes['Attributes'].should.contain('Endpoint')
attributes['Attributes'].should.contain('TopicArn')
attributes['Attributes'].should.contain('Protocol')
attributes['Attributes'].should.contain('SubscriptionArn')
@mock_sns
def test_creating_subscription_with_attributes():