<s> """<STR_LIT>""" <EOL> import mock <EOL> import unittest <EOL> from cloudcafe . networking . lbaas . lbaas_api . load_balancer . behaviors import LoadBalancerBehaviors <EOL> from cloudcafe . networking . lbaas . lbaas_api . load_balancer . client import LoadBalancersClient <EOL> class LoadBalancerBehaviorsFixture ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> super ( LoadBalancerBehaviorsFixture , cls ) . setUpClass ( ) <EOL> cls . auth_token = "<STR_LIT>" <EOL> cls . url = "<STR_LIT>" <EOL> cls . load_balancer_id = "<STR_LIT>" <EOL> cls . name = "<STR_LIT>" <EOL> cls . vip_subnet = "<STR_LIT>" <EOL> cls . tenant_id = "<STR_LIT>" <EOL> cls . admin_state_up = True <EOL> cls . description = "<STR_LIT>" <EOL> cls . vip_address = "<STR_LIT>" <EOL> cls . desired_status = "<STR_LIT>" <EOL> cls . interval_time = <NUM_LIT:20> <EOL> cls . timeout = <NUM_LIT> <EOL> cls . load_balancers_client = LoadBalancersClient ( <EOL> url = cls . url , <EOL> auth_token = cls . auth_token , <EOL> serialize_format = cls . SERIALIZE , <EOL> deserialize_format = cls . DESERIALIZE ) <EOL> cls . load_balancer_behaviors = LoadBalancerBehaviors ( <EOL> load_balancers_client = cls . load_balancers_client , config = None ) <EOL> class LoadBalancerBehaviorsTests ( object ) : <EOL> @ mock . patch . object ( LoadBalancerBehaviors , '<STR_LIT>' , <EOL> autospec = True ) <EOL> def test_create_active_load_balancer ( self , mock_request ) : <EOL> create_active_load_balancer_kwargs = ( <EOL> { '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT>' : self . vip_subnet , <EOL> '<STR_LIT>' : self . tenant_id , <EOL> '<STR_LIT:description>' : self . description , <EOL> '<STR_LIT>' : self . vip_address , <EOL> '<STR_LIT>' : self . admin_state_up } ) <EOL> self . load_balancer_behaviors . create_active_load_balancer ( <EOL> ** create_active_load_balancer_kwargs ) <EOL> mock_request . assert_called_once_with ( <EOL> self . load_balancer_behaviors , <EOL> ** create_active_load_balancer_kwargs ) <EOL> @ mock . patch . object ( LoadBalancerBehaviors , <EOL> '<STR_LIT>' , <EOL> autospec = True ) <EOL> def test_update_load_balancer_and_wait_for_active ( self , mock_request ) : <EOL> update_load_balancer_and_wait_for_active_kwargs = ( <EOL> { '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT:description>' : self . description , <EOL> '<STR_LIT>' : self . admin_state_up } ) <EOL> self . load_balancer_behaviors . update_load_balancer_and_wait_for_active ( <EOL> ** update_load_balancer_and_wait_for_active_kwargs ) <EOL> mock_request . assert_called_once_with ( <EOL> self . load_balancer_behaviors , <EOL> ** update_load_balancer_and_wait_for_active_kwargs ) <EOL> @ mock . patch . object ( LoadBalancerBehaviors , '<STR_LIT>' , <EOL> autospec = True ) <EOL> def test_wait_for_load_balancer_status ( self , mock_request ) : <EOL> wait_for_load_balancer_status_kwargs = ( <EOL> { '<STR_LIT>' : self . load_balancer_id , <EOL> '<STR_LIT>' : self . desired_status , <EOL> '<STR_LIT>' : self . interval_time , <EOL> '<STR_LIT>' : self . timeout } ) <EOL> self . load_balancer_behaviors . wait_for_load_balancer_status ( <EOL> ** wait_for_load_balancer_status_kwargs ) <EOL> mock_request . assert_called_once_with ( <EOL> self . load_balancer_behaviors , <EOL> ** wait_for_load_balancer_status_kwargs ) <EOL> class LoadBalancersClientTestsXML ( LoadBalancerBehaviorsFixture , <EOL> LoadBalancerBehaviorsTests ) : <EOL> SERIALIZE = '<STR_LIT>' <EOL> DESERIALIZE = '<STR_LIT>' <EOL> class LoadBalancersClientTestsJSON ( LoadBalancerBehaviorsFixture , <EOL> LoadBalancerBehaviorsTests ) : <EOL> SERIALIZE = '<STR_LIT>' <EOL> DESERIALIZE = '<STR_LIT>' </s>
