#NEWLINE# def test_present_add_new_subscription_to_existing_topic_with_subscriptions( self ) : #NEWLINE# #INDENT# self . run_state ( 'boto_sns.present' , name = self . topic_name , subscriptions = [ { #NEWLINE# #INDENT# 'protocol' : 'https' , #NEWLINE# 'endpoint' : 'https://www.example.com/sns/endpoint' , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# ret = self . run_state ( 'boto_sns.present' , name = self . topic_name , subscriptions = [ { #NEWLINE# #INDENT# 'protocol' : 'https' , #NEWLINE# 'endpoint' : 'https://www.example.com/sns/endpoint-2' , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# self . assertSaltTrueReturn ( ret ) #NEWLINE# self . assertSaltStateChangesEqual ( ret , { #NEWLINE# #INDENT# 'old' : None , #NEWLINE# 'new' : { #NEWLINE# #INDENT# 'subscriptions' : [ { #NEWLINE# #INDENT# 'protocol' : 'https' , #NEWLINE# 'endpoint' : 'https://www.example.com/sns/endpoint-2' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertInSaltComment ( 'AWS SNS subscription https:https://www.example.com/sns/endpoint-2 set on topic {0}.' . format ( self . topic_name ) , ret ) #NEWLINE# self . assertSubscriptionInTopic ( { #NEWLINE# #INDENT# 'Protocol' : 'https' , #NEWLINE# 'Endpoint' : 'https://www.example.com/sns/endpoint' , #NEWLINE# #UNINDENT# } , self . topic_name ) #NEWLINE# self . assertSubscriptionInTopic ( { #NEWLINE# #INDENT# 'Protocol' : 'https' , #NEWLINE# 'Endpoint' : 'https://www.example.com/sns/endpoint-2' , #NEWLINE# #UNINDENT# } , self . topic_name )