#NEWLINE# def test_multivm_acceptance( self ) : #NEWLINE# #INDENT# project = os . path . join ( testenv . topdir , 'examples' , 'multivm' ) #NEWLINE# os . chdir ( project ) #NEWLINE# status = main ( [ '-u' , testenv . username , '-p' , testenv . password , '-s' , testenv . service_url , 'run' , 'acceptance' ] ) #NEWLINE# for vm in env . application [ 'vms' ] : #NEWLINE# #INDENT# if ( vm [ 'name' ] == 'web' ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# assert ( vm [ 'name' ] == 'web' ) #NEWLINE# ipaddr = vm [ 'dynamicMetadata' ] [ 'externalIp' ] #NEWLINE# for svc in vm [ 'suppliedServices' ] : #NEWLINE# #INDENT# basesvc = svc [ 'baseService' ] #NEWLINE# if basesvc [ 'name' ] . startswith ( 'http' ) : #NEWLINE# #INDENT# port = basesvc [ 'portRange' ] #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# assert basesvc [ 'name' ] . startswith ( 'http' ) #NEWLINE# assert ( status == 0 ) #NEWLINE# url = 'http://{0}:{1}/FrontPage' . format ( ipaddr , port ) #NEWLINE# fin = urllib . urlopen ( url ) #NEWLINE# page = fin . read ( ) #NEWLINE# fin . close ( ) #NEWLINE# assert ( 'Pyramid tutorial wiki' in page )