#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( DHCPAgentAZAwareWeightSchedulerTestCase , self ) . setUp ( ) #NEWLINE# DB_PLUGIN_KLASS = 'neutron.plugins.ml2.plugin.Ml2Plugin' #NEWLINE# self . setup_coreplugin ( DB_PLUGIN_KLASS ) #NEWLINE# cfg . CONF . set_override ( 'network_scheduler_driver' , 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler' ) #NEWLINE# self . plugin = importutils . import_object ( 'neutron.plugins.ml2.plugin.Ml2Plugin' ) #NEWLINE# mock . patch . object ( self . plugin , 'filter_hosts_with_network_access' , side_effect = ( lambda context , network_id , hosts : hosts ) ) . start ( ) #NEWLINE# cfg . CONF . set_override ( 'dhcp_agents_per_network' , 1 ) #NEWLINE# cfg . CONF . set_override ( 'dhcp_load_type' , 'networks' )