Added ConfirmSubscription + Tests + checks
For now subscriptions do nothing, but if we go the route of handing out subscribe tokens, I have layed the groundwork for validating that
This commit is contained in:
parent
ef8a97f6c3
commit
19074c535c
3 changed files with 57 additions and 6 deletions
|
|
@ -87,14 +87,27 @@ def test_opt_in():
|
|||
@mock_sns
|
||||
def test_add_remove_permissions():
|
||||
conn = boto3.client('sns', region_name='us-east-1')
|
||||
response = conn.create_topic(Name='testpermissions')
|
||||
|
||||
conn.add_permission(
|
||||
TopicArn='arn:aws:sns:us-east-1:000000000000:terry_test',
|
||||
TopicArn=response['TopicArn'],
|
||||
Label='Test1234',
|
||||
AWSAccountId=['999999999999'],
|
||||
ActionName=['AddPermission']
|
||||
)
|
||||
conn.remove_permission(
|
||||
TopicArn='arn:aws:sns:us-east-1:000000000000:terry_test',
|
||||
TopicArn=response['TopicArn'],
|
||||
Label='Test1234'
|
||||
)
|
||||
|
||||
|
||||
@mock_sns
|
||||
def test_confirm_subscription():
|
||||
conn = boto3.client('sns', region_name='us-east-1')
|
||||
response = conn.create_topic(Name='testconfirm')
|
||||
|
||||
conn.confirm_subscription(
|
||||
TopicArn=response['TopicArn'],
|
||||
Token='2336412f37fb687f5d51e6e241d59b68c4e583a5cee0be6f95bbf97ab8d2441cf47b99e848408adaadf4c197e65f03473d53c4ba398f6abbf38ce2e8ebf7b4ceceb2cd817959bcde1357e58a2861b05288c535822eb88cac3db04f592285249971efc6484194fc4a4586147f16916692',
|
||||
AuthenticateOnUnsubscribe='true'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue