#NEWLINE# @ mock . patch . object ( compute_api . API , 'evacuate' ) #NEWLINE# def test_evacuate_instance( self , mock_evacuate ) : #NEWLINE# #INDENT# self . _get_evacuate_response ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# admin_pass = mock_evacuate . call_args_list [ 0 ] [ 0 ] [ 4 ] #NEWLINE# on_shared_storage = mock_evacuate . call_args_list [ 0 ] [ 0 ] [ 3 ] #NEWLINE# self . assertEqual ( CONF . password_length , len ( admin_pass ) ) #NEWLINE# self . assertIsNone ( on_shared_storage )