Use stevedore's make_test_instance
Replace the use of TestManager with make_test_instance to get an instance of the type of manager expected. The old TestManager class is deprecated Change-Id: I717c0296bf8ae07b1dad8f0045bfe12c8620ad0a Partial-bug: #1273455
This commit is contained in:
parent
1d25c5ae20
commit
dd8eb5196f
@ -21,7 +21,6 @@ import uuid
|
|||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
import mock
|
||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
from stevedore.tests import manager as test_manager
|
|
||||||
import testscenarios
|
import testscenarios
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
@ -314,11 +313,11 @@ class TestRoutingNotifier(test_utils.BaseTestCase):
|
|||||||
self.router = routing.RoutingDriver(None, None, None)
|
self.router = routing.RoutingDriver(None, None, None)
|
||||||
|
|
||||||
def _fake_extension_manager(self, ext):
|
def _fake_extension_manager(self, ext):
|
||||||
return test_manager.TestExtensionManager(
|
return extension.ExtensionManager.make_test_instance(
|
||||||
[extension.Extension('test', None, None, ext), ])
|
[extension.Extension('test', None, None, ext), ])
|
||||||
|
|
||||||
def _empty_extension_manager(self):
|
def _empty_extension_manager(self):
|
||||||
return test_manager.TestExtensionManager([])
|
return extension.ExtensionManager.make_test_instance([])
|
||||||
|
|
||||||
def test_should_load_plugin(self):
|
def test_should_load_plugin(self):
|
||||||
self.router.used_drivers = set(["zoo", "blah"])
|
self.router.used_drivers = set(["zoo", "blah"])
|
||||||
|
Loading…
Reference in New Issue
Block a user