#NEWLINE# def testSshWithIndexOutOfBounds( self ) : #NEWLINE# #INDENT# appscale = AppScale ( ) #NEWLINE# contents = { #NEWLINE# #INDENT# 'keyname' : 'boo' , #NEWLINE# #UNINDENT# } #NEWLINE# yaml_dumped_contents = yaml . dump ( contents ) #NEWLINE# one = { #NEWLINE# #INDENT# 'public_ip' : 'blarg' , #NEWLINE# #UNINDENT# } #NEWLINE# nodes = [ one ] #NEWLINE# nodes_contents = json . dumps ( nodes ) #NEWLINE# mock = self . addMockForAppScalefile ( appscale , yaml_dumped_contents ) #NEWLINE# mock . should_receive ( 'open' ) . with_args ( appscale . get_locations_json_file ( 'boo' ) ) . and_return ( flexmock ( read = ( lambda : nodes_contents ) ) ) #NEWLINE# self . assertRaises ( AppScaleException , nodes . ssh , 1 )