Merge "Fix isinstance assertions"
This commit is contained in:
commit
614479c5d5
@ -1429,7 +1429,7 @@ class TestConvertIPPrefixToCIDR(base.BaseTestCase):
|
||||
|
||||
class TestConvertProtocol(base.BaseTestCase):
|
||||
def test_convert_numeric_protocol(self):
|
||||
assert(isinstance(ext_sg.convert_protocol('2'), str))
|
||||
self.assertIsInstance(ext_sg.convert_protocol('2'), str)
|
||||
|
||||
def test_convert_bad_protocol(self):
|
||||
for val in ['bad', '256', '-1']:
|
||||
|
@ -56,9 +56,8 @@ class NeutronManagerTestCase(base.BaseTestCase):
|
||||
mgr = manager.NeutronManager.get_instance()
|
||||
plugin = mgr.get_service_plugins()[constants.DUMMY]
|
||||
|
||||
self.assertTrue(
|
||||
isinstance(plugin,
|
||||
(dummy_plugin.DummyServicePlugin, types.ClassType)),
|
||||
self.assertIsInstance(
|
||||
plugin, (dummy_plugin.DummyServicePlugin, types.ClassType),
|
||||
"loaded plugin should be of type neutronDummyPlugin")
|
||||
|
||||
def test_service_plugin_by_name_is_loaded(self):
|
||||
@ -67,9 +66,8 @@ class NeutronManagerTestCase(base.BaseTestCase):
|
||||
mgr = manager.NeutronManager.get_instance()
|
||||
plugin = mgr.get_service_plugins()[constants.DUMMY]
|
||||
|
||||
self.assertTrue(
|
||||
isinstance(plugin,
|
||||
(dummy_plugin.DummyServicePlugin, types.ClassType)),
|
||||
self.assertIsInstance(
|
||||
plugin, (dummy_plugin.DummyServicePlugin, types.ClassType),
|
||||
"loaded plugin should be of type neutronDummyPlugin")
|
||||
|
||||
def test_multiple_plugins_specified_for_service_type(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user