#NEWLINE# @ mock_cloudformation ( ) #NEWLINE# @ mock_sqs ( ) #NEWLINE# def test_update_stack_and_add_resource( ) : #NEWLINE# #INDENT# sqs_template = { #NEWLINE# #INDENT# 'AWSTemplateFormatVersion' : '2010-09-09' , #NEWLINE# 'Resources' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# sqs_template_json = json . dumps ( sqs_template ) #NEWLINE# conn = boto . cloudformation . connect_to_region ( 'us-west-1' ) #NEWLINE# conn . create_stack ( 'test_stack' , template_body = sqs_template_json ) #NEWLINE# sqs_conn = boto . sqs . connect_to_region ( 'us-west-1' ) #NEWLINE# queues = sqs_conn . get_all_queues ( ) #NEWLINE# queues . should . have . length_of ( 0 ) #NEWLINE# sqs_template = { #NEWLINE# #INDENT# 'AWSTemplateFormatVersion' : '2010-09-09' , #NEWLINE# 'Resources' : { #NEWLINE# #INDENT# 'QueueGroup' : { #NEWLINE# #INDENT# 'Type' : 'AWS::SQS::Queue' , #NEWLINE# 'Properties' : { #NEWLINE# #INDENT# 'QueueName' : 'my-queue' , #NEWLINE# 'VisibilityTimeout' : 60 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# sqs_template_json = json . dumps ( sqs_template ) #NEWLINE# conn . update_stack ( 'test_stack' , sqs_template_json ) #NEWLINE# queues = sqs_conn . get_all_queues ( ) #NEWLINE# queues . should . have . length_of ( 1 )