Add a test
This commit is contained in:
parent
03986df929
commit
02fc1fbcef
@ -181,6 +181,30 @@ def test_subscription_paging():
|
|||||||
int(DEFAULT_PAGE_SIZE / 3))
|
int(DEFAULT_PAGE_SIZE / 3))
|
||||||
topic1_subscriptions.shouldnt.have("NextToken")
|
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
|
@mock_sns
|
||||||
def test_creating_subscription_with_attributes():
|
def test_creating_subscription_with_attributes():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user