#NEWLINE# def test_stack_nested( self ) : #NEWLINE# #INDENT# test_template = tempfile . NamedTemporaryFile ( suffix = '.yaml' , delete = False ) #NEWLINE# test_template . write ( root_template ) #NEWLINE# test_template . close ( ) #NEWLINE# simple_tmpl = tempfile . NamedTemporaryFile ( suffix = '.yaml' , delete = False ) #NEWLINE# simple_tmpl . write ( simple_template ) #NEWLINE# simple_tmpl . close ( ) #NEWLINE# env = tempfile . NamedTemporaryFile ( suffix = '.yaml' , delete = False ) #NEWLINE# env . write ( ( environment % simple_tmpl . name ) ) #NEWLINE# env . close ( ) #NEWLINE# self . stack_name = self . getUniqueString ( 'nested_stack' ) #NEWLINE# self . addCleanup ( self . _cleanup_stack ) #NEWLINE# stack = self . cloud . create_stack ( name = self . stack_name , template_file = test_template . name , environment_files = [ env . name ] , wait = True ) #NEWLINE# self . assertEqual ( 'CREATE_COMPLETE' , stack [ 'stack_status' ] ) #NEWLINE# rands = stack [ 'outputs' ] [ 0 ] [ 'output_value' ] #NEWLINE# self . assertEqual ( [ '0' , '1' , '2' , '3' , '4' ] , sorted ( rands . keys ( ) ) ) #NEWLINE# for rand in rands . values ( ) : #NEWLINE# #INDENT# self . assertEqual ( 10 , len ( rand ) )