From 02fc1fbcef69a4de1a98bf808a15beb71ebfb280 Mon Sep 17 00:00:00 2001 From: Ivan Dromigny Date: Mon, 14 Oct 2019 18:03:01 +0200 Subject: [PATCH] Add a test --- tests/test_sns/test_subscriptions_boto3.py | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/test_sns/test_subscriptions_boto3.py b/tests/test_sns/test_subscriptions_boto3.py index 012cd6470..d09f625fd 100644 --- a/tests/test_sns/test_subscriptions_boto3.py +++ b/tests/test_sns/test_subscriptions_boto3.py @@ -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():