#NEWLINE# def test_client_create_body( self ) : #NEWLINE# #INDENT# mgr = self . client . _manager #NEWLINE# nd = fakes . FakeNode ( ) #NEWLINE# vip = fakes . FakeVirtualIP ( ) #NEWLINE# fake_name = 'FAKE' #NEWLINE# fake_port = 999 #NEWLINE# fake_protocol = 'FAKE' #NEWLINE# fake_nodes = [ nd ] #NEWLINE# fake_virtual_ips = [ vip ] #NEWLINE# fake_algorithm = 'FAKE' #NEWLINE# fake_accessList = [ 'FAKE' ] #NEWLINE# fake_halfClosed = False #NEWLINE# fake_connectionLogging = True #NEWLINE# fake_connectionThrottle = True #NEWLINE# fake_healthMonitor = object ( ) #NEWLINE# fake_metadata = { #NEWLINE# #INDENT# 'fake' : utils . random_unicode ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# fake_timeout = 42 #NEWLINE# fake_sessionPersistence = True #NEWLINE# fake_httpsRedirect = True #NEWLINE# expected = { #NEWLINE# #INDENT# 'loadBalancer' : { #NEWLINE# #INDENT# 'name' : fake_name , #NEWLINE# 'port' : fake_port , #NEWLINE# 'protocol' : fake_protocol , #NEWLINE# 'nodes' : [ nd . to_dict ( ) ] , #NEWLINE# 'virtualIps' : [ vip . to_dict ( ) ] , #NEWLINE# 'algorithm' : fake_algorithm , #NEWLINE# 'accessList' : fake_accessList , #NEWLINE# 'halfClosed' : fake_halfClosed , #NEWLINE# 'connectionLogging' : fake_connectionLogging , #NEWLINE# 'connectionThrottle' : fake_connectionThrottle , #NEWLINE# 'healthMonitor' : fake_healthMonitor , #NEWLINE# 'metadata' : fake_metadata , #NEWLINE# 'timeout' : fake_timeout , #NEWLINE# 'sessionPersistence' : fake_sessionPersistence , #NEWLINE# 'httpsRedirect' : fake_httpsRedirect , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# ret = mgr . _create_body ( fake_name , port = fake_port , protocol = fake_protocol , nodes = fake_nodes , virtual_ips = fake_virtual_ips , algorithm = fake_algorithm , accessList = fake_accessList , connectionLogging = fake_connectionLogging , halfClosed = fake_halfClosed , connectionThrottle = fake_connectionThrottle , healthMonitor = fake_healthMonitor , metadata = fake_metadata , timeout = mgr , sessionPersistence = fake_sessionPersistence , httpsRedirect = fake_httpsRedirect ) #NEWLINE# self . assertEqual ( ret , expected )