#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( ProvidernetExtensionTestCase , self ) . setUp ( ) #NEWLINE# plugin = 'neutron.neutron_plugin_base_v2.NeutronPluginBaseV2' #NEWLINE# extensions . PluginAwareExtensionManager . _instance = None #NEWLINE# self . useFixture ( tools . AttributeMapMemento ( ) ) #NEWLINE# self . setup_coreplugin ( plugin ) #NEWLINE# cfg . CONF . set_override ( 'allow_pagination' , True ) #NEWLINE# cfg . CONF . set_override ( 'allow_sorting' , True ) #NEWLINE# self . _plugin_patcher = mock . patch ( plugin , autospec = True ) #NEWLINE# self . plugin = self . _plugin_patcher . start ( ) #NEWLINE# instance = self . plugin . return_value #NEWLINE# instance . get_networks_count . return_value = 1 #NEWLINE# manager . NeutronManager . get_plugin ( ) . supported_extension_aliases = [ 'provider' ] #NEWLINE# ext_mgr = ProviderExtensionManager ( ) #NEWLINE# self . ext_mdw = test_extensions . setup_extensions_middleware ( ext_mgr ) #NEWLINE# self . addCleanup ( self . _plugin_patcher . stop ) #NEWLINE# self . api = webtest . TestApp ( router . APIRouter ( ) ) #NEWLINE# quota . QUOTAS . _driver = None #NEWLINE# cfg . CONF . set_override ( 'quota_driver' , 'neutron.quota.ConfDriver' , group = 'QUOTAS' )