#NEWLINE# def test_ec2_server_get( ) : #NEWLINE# #INDENT# backend = server . create_backend_app ( 'ec2' ) #NEWLINE# test_client = backend . test_client ( ) #NEWLINE# res = test_client . get ( '/?Action=RunInstances&ImageId=ami-60a54009' , headers = { #NEWLINE# #INDENT# 'Host' : 'ec2.us-east-1.amazonaws.com' , #NEWLINE# #UNINDENT# } ) #NEWLINE# groups = re . search ( '<instanceId>(.*)</instanceId>' , res . data . decode ( 'utf-8' ) ) #NEWLINE# instance_id = groups . groups ( ) [ 0 ] #NEWLINE# res = test_client . get ( '/?Action=DescribeInstances' ) #NEWLINE# res . data . decode ( 'utf-8' ) . should . contain ( test_client )