<s> """<STR_LIT>""" <EOL> import mock <EOL> import unittest <EOL> from cloudcafe . networking . lbaas . lbaas_api . health_monitor . behaviors import HealthMonitorBehaviors <EOL> from cloudcafe . networking . lbaas . lbaas_api . health_monitor . client import HealthMonitorsClient <EOL> class HealthMonitorBehaviorsFixture ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> super ( HealthMonitorBehaviorsFixture , cls ) . setUpClass ( ) <EOL> cls . auth_token = "<STR_LIT>" <EOL> cls . url = "<STR_LIT>" <EOL> cls . health_monitor_id = "<STR_LIT>" <EOL> cls . type_ = "<STR_LIT>" <EOL> cls . tenant_id = "<STR_LIT>" <EOL> cls . delay = <NUM_LIT:20> <EOL> cls . timeout = <NUM_LIT:10> <EOL> cls . max_retries = <NUM_LIT:5> <EOL> cls . http_method = "<STR_LIT:GET>" <EOL> cls . url_path = "<STR_LIT>" <EOL> cls . expected_codes = "<STR_LIT>" <EOL> cls . admin_state_up = False <EOL> cls . desired_status = "<STR_LIT>" <EOL> cls . interval_time = <NUM_LIT:20> <EOL> cls . timeout = <NUM_LIT> <EOL> cls . health_monitors_client = HealthMonitorsClient ( <EOL> url = cls . url , <EOL> auth_token = cls . auth_token , <EOL> serialize_format = cls . SERIALIZE , <EOL> deserialize_format = cls . DESERIALIZE ) <EOL> cls . health_monitor_behaviors = HealthMonitorBehaviors ( <EOL> health_monitors_client = cls . health_monitors_client , config = None ) <EOL> class HealthMonitorBehaviorsTests ( object ) : <EOL> @ mock . patch . object ( HealthMonitorBehaviors , '<STR_LIT>' , <EOL> autospec = True ) <EOL> def test_create_active_health_monitor ( self , mock_request ) : <EOL> create_active_health_monitor_kwargs = ( <EOL> { '<STR_LIT>' : self . type_ , <EOL> '<STR_LIT>' : self . tenant_id , <EOL> '<STR_LIT>' : self . delay , <EOL> '<STR_LIT>' : self . timeout , <EOL> '<STR_LIT>' : self . max_retries , <EOL> '<STR_LIT>' : self . http_method , <EOL> '<STR_LIT>' : self . url_path , <EOL> '<STR_LIT>' : self . expected_codes , <EOL> '<STR_LIT>' : self . admin_state_up } ) <EOL> self . health_monitor_behaviors . create_active_health_monitor ( <EOL> ** create_active_health_monitor_kwargs ) <EOL> mock_request . assert_called_once_with ( <EOL> self . health_monitor_behaviors , <EOL> ** create_active_health_monitor_kwargs ) <EOL> @ mock . patch . object ( HealthMonitorBehaviors , <EOL> '<STR_LIT>' , <EOL> autospec = True ) <EOL> def test_update_health_monitor_and_wait_for_active ( self , mock_request ) : <EOL> update_health_monitor_and_wait_for_active_kwargs = ( <EOL> { '<STR_LIT>' : self . health_monitor_id , <EOL> '<STR_LIT>' : self . delay , <EOL> '<STR_LIT>' : self . timeout , <EOL> '<STR_LIT>' : self . max_retries , <EOL> '<STR_LIT>' : self . http_method , <EOL> '<STR_LIT>' : self . url_path , <EOL> '<STR_LIT>' : self . expected_codes , <EOL> '<STR_LIT>' : self . admin_state_up } ) <EOL> self . health_monitor_behaviors . update_health_monitor_and_wait_for_active ( <EOL> ** update_health_monitor_and_wait_for_active_kwargs ) <EOL> mock_request . assert_called_once_with ( <EOL> self . health_monitor_behaviors , <EOL> ** update_health_monitor_and_wait_for_active_kwargs ) <EOL> @ mock . patch . object ( HealthMonitorBehaviors , <EOL> '<STR_LIT>' , <EOL> autospec = True ) <EOL> def test_wait_for_health_monitor_status ( self , mock_request ) : <EOL> wait_for_health_monitor_status_kwargs = ( <EOL> { '<STR_LIT>' : self . health_monitor_id , <EOL> '<STR_LIT>' : self . desired_status , <EOL> '<STR_LIT>' : self . interval_time , <EOL> '<STR_LIT>' : self . timeout } ) <EOL> self . health_monitor_behaviors . wait_for_health_monitor_status ( <EOL> ** wait_for_health_monitor_status_kwargs ) <EOL> mock_request . assert_called_once_with ( <EOL> self . health_monitor_behaviors , <EOL> ** wait_for_health_monitor_status_kwargs ) <EOL> class HealthMonitorsClientTestsXML ( HealthMonitorBehaviorsFixture , <EOL> HealthMonitorBehaviorsTests ) : <EOL> SERIALIZE = '<STR_LIT>' <EOL> DESERIALIZE = '<STR_LIT>' <EOL> class HealthMonitorsClientTestsJSON ( HealthMonitorBehaviorsFixture , <EOL> HealthMonitorBehaviorsTests ) : <EOL> SERIALIZE = '<STR_LIT>' <EOL> DESERIALIZE = '<STR_LIT>' </s>
