#NEWLINE# @ mock . patch ( ( HEAT_STACKS + '._delete_stack' ) ) #NEWLINE# @ mock . patch ( ( HEAT_STACKS + '._restore_stack' ) ) #NEWLINE# @ mock . patch ( ( HEAT_STACKS + '._snapshot_stack' ) ) #NEWLINE# @ mock . patch ( ( HEAT_STACKS + '._create_stack' ) ) #NEWLINE# def test_create_snapshot_restore_delete_stack( self , mock__create_stack , mock__snapshot_stack , mock__restore_stack , mock__delete_stack ) : #NEWLINE# #INDENT# heat_scenario = stacks . HeatStacks ( self . context ) #NEWLINE# mock__snapshot_stack . return_value = { #NEWLINE# #INDENT# 'id' : 'dummy_id' , #NEWLINE# #UNINDENT# } #NEWLINE# heat_scenario . create_snapshot_restore_delete_stack ( template_path = self . default_template , parameters = self . default_parameters , files = self . default_files , environment = self . default_environment ) #NEWLINE# mock__create_stack . assert_called_once_with ( self . default_template , self . default_parameters , self . default_files , self . default_environment ) #NEWLINE# mock__snapshot_stack . assert_called_once_with ( mock__create_stack . return_value ) #NEWLINE# mock__restore_stack . assert_called_once_with ( mock__create_stack . return_value , 'dummy_id' ) #NEWLINE# mock__delete_stack . assert_called_once_with ( mock__create_stack . return_value )