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:
Doug Hellmann 2014-01-27 17:56:33 -05:00
parent 1d25c5ae20
commit dd8eb5196f

View File

@ -21,7 +21,6 @@ import uuid
import fixtures
import mock
from stevedore import extension
from stevedore.tests import manager as test_manager
import testscenarios
import yaml
@ -314,11 +313,11 @@ class TestRoutingNotifier(test_utils.BaseTestCase):
self.router = routing.RoutingDriver(None, None, None)
def _fake_extension_manager(self, ext):
return test_manager.TestExtensionManager(
return extension.ExtensionManager.make_test_instance(
[extension.Extension('test', None, None, ext), ])
def _empty_extension_manager(self):
return test_manager.TestExtensionManager([])
return extension.ExtensionManager.make_test_instance([])
def test_should_load_plugin(self):
self.router.used_drivers = set(["zoo", "blah"])