#NEWLINE# def testGetManyBackends( self ) : #NEWLINE# #INDENT# get_response = { #NEWLINE# #INDENT# 'Address' : 'a' , #NEWLINE# 'BackendServers' : { #NEWLINE# #INDENT# 'BackendServer' : [ { #NEWLINE# #INDENT# 'ServerId' : 'sid1' , #NEWLINE# 'Weight' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'ServerId' : 'sid2' , #NEWLINE# 'Weight' : 1 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , #NEWLINE# 'AddressType' : 'i' , #NEWLINE# 'ListenerPorts' : { #NEWLINE# #INDENT# 'ListenerPort' : [ 1 ] , #NEWLINE# #UNINDENT# } , #NEWLINE# 'LoadBalancerId' : 'id' , #NEWLINE# 'LoadBalancerName' : 'n' , #NEWLINE# 'LoadBalancerStatus' : 's' , #NEWLINE# 'RegionId' : 'r' , #NEWLINE# #UNINDENT# } #NEWLINE# expected_backends = [ slb . BackendServer ( 'sid1' , 1 ) , slb . BackendServer ( 'sid2' , 1 ) ] #NEWLINE# expect = slb . LoadBalancer ( 'id' , 'r' , 'n' , 's' , 'a' , 'i' , [ 1 ] , expected_backends ) #NEWLINE# self . conn . get ( { #NEWLINE# #INDENT# 'Action' : 'DescribeLoadBalancerAttribute' , #NEWLINE# 'LoadBalancerId' : 'id' , #NEWLINE# #UNINDENT# } ) . AndReturn ( get_response ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . assertEqual ( expect , self . conn . get_load_balancer ( 'id' ) ) #NEWLINE# self . mox . VerifyAll ( )