#NEWLINE# def testDeployWithCloudAppScalefile( self ) : #NEWLINE# #INDENT# appscale = AppScale ( ) #NEWLINE# contents = { #NEWLINE# #INDENT# 'infrastructure' : 'ec2' , #NEWLINE# 'machine' : 'ami-ABCDEFG' , #NEWLINE# 'keyname' : 'bookey' , #NEWLINE# 'group' : 'boogroup' , #NEWLINE# 'verbose' : True , #NEWLINE# 'min' : 1 , #NEWLINE# 'max' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# yaml_dumped_contents = yaml . dump ( contents ) #NEWLINE# self . addMockForAppScalefile ( appscale , yaml_dumped_contents ) #NEWLINE# fake_port = 8080 #NEWLINE# fake_host = 'fake_host' #NEWLINE# flexmock ( AppScaleTools ) #NEWLINE# AppScaleTools . should_receive ( 'upload_app' ) . and_return ( ( fake_host , fake_port ) ) #NEWLINE# app = '/bar/app' #NEWLINE# ( host , port ) = appscale . deploy ( app ) #NEWLINE# self . assertEquals ( fake_host , host ) #NEWLINE# self . assertEquals ( fake_port , port )