Use assertIsInstance to test the results of get_engine and get_provider
Replace to TODO(boris-42) in test_engine and test_provider with assertIsInstance. Change-Id: I6c486520af15e928d2098a5c10d348b4a16b11da
This commit is contained in:

committed by
Sergey Skripnick

parent
9bd4a1e8f2
commit
7e02e33c1f
@@ -223,8 +223,7 @@ class EngineFactoryTestCase(test.TestCase):
|
||||
for e in engines:
|
||||
engine_inst = deploy.EngineFactory.get_engine(e.__name__,
|
||||
deployment)
|
||||
# TODO(boris-42): make it work through assertIsInstance
|
||||
self.assertEqual(str(type(engine_inst)), str(e))
|
||||
self.assertIsInstance(engine_inst, e)
|
||||
|
||||
def test_get_available_engines(self):
|
||||
engines = set([e.__name__ for e in EngineFactoryTestCase.FAKE_ENGINES])
|
||||
|
@@ -64,8 +64,7 @@ class ProviderTestCase(test.TestCase):
|
||||
for p in FAKE_PROVIDERS:
|
||||
p_inst = ProviderFactory.get_provider({"name": p.__name__},
|
||||
None)
|
||||
# TODO(boris-42): make it work through assertIsInstance
|
||||
self.assertEqual(str(type(p_inst)), str(p))
|
||||
self.assertIsInstance(p_inst, p)
|
||||
|
||||
def test_get_available_providers(self):
|
||||
providers = set([p.__name__ for p in FAKE_PROVIDERS])
|
||||
|
Reference in New Issue
Block a user