#NEWLINE# def testCleanInClusterDeployment( self ) : #NEWLINE# #INDENT# contents = { #NEWLINE# #INDENT# 'ips_layout' : { #NEWLINE# #INDENT# 'controller' : 'public1' , #NEWLINE# 'servers' : [ 'public2' , 'public3' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# 'test' : True , #NEWLINE# #UNINDENT# } #NEWLINE# yaml_dumped_contents = yaml . dump ( contents ) #NEWLINE# flexmock ( RemoteHelper ) #NEWLINE# RemoteHelper . should_receive ( 'ssh' ) . with_args ( re . compile ( 'public[123]' ) , 'appscale' , str , False ) #NEWLINE# flexmock ( LocalState ) #NEWLINE# LocalState . should_receive ( 'cleanup_appscale_files' ) . with_args ( 'appscale' ) #NEWLINE# appscale = AppScale ( ) #NEWLINE# self . addMockForAppScalefile ( appscale , yaml_dumped_contents ) #NEWLINE# expected = [ 'public1' , 'public2' , 'public3' ] #NEWLINE# self . assertEquals ( expected , appscale . clean ( ) )