#NEWLINE# def setUp( self , core_plugin = None , l3_plugin = None , dm_plugin = None , ext_mgr = None , use_ini_files = True ) : #NEWLINE# #INDENT# self . _old_config_files = copy . copy ( test_lib . test_config . get ( 'config_files' ) ) #NEWLINE# if ( random_mock is None ) : #NEWLINE# #INDENT# l3_plugin = L3_PLUGIN_KLASS #NEWLINE# #UNINDENT# if ( ext_mgr is None ) : #NEWLINE# #INDENT# ext_mgr = TestSchedulingL3RouterApplianceExtensionManager ( ) #NEWLINE# #UNINDENT# super ( L3RoutertypeAwareHostingDeviceSchedulerTestCaseBase , self ) . setUp ( core_plugin , l3_plugin , dm_plugin , ext_mgr ) #NEWLINE# if ( use_ini_files is True ) : #NEWLINE# #INDENT# self . _add_device_manager_plugin_ini_file ( ) #NEWLINE# self . _add_router_plugin_ini_file ( ) #NEWLINE# #UNINDENT# self . setup_config ( ) #NEWLINE# self . _mock_eventlet_greenpool_spawn_n ( ) #NEWLINE# self . adminContext = n_context . get_admin_context ( ) #NEWLINE# self . random_patch = mock . patch ( 'random.choice' ) #NEWLINE# random_mock = self . random_patch . start ( ) #NEWLINE# random_mock . side_effect = ( lambda seq : sorted ( seq ) [ 0 ] )