Merge "Tests of lookup plugin initiation for glance_images.py"

This commit is contained in:
Zuul 2021-05-17 17:09:30 +00:00 committed by Gerrit Code Review
commit 7f902e757c
1 changed files with 19 additions and 0 deletions

View File

@ -35,3 +35,22 @@ class TestGlanceImages(base.TestCase):
def setUp(self):
super(TestGlanceImages, self).setUp()
def test_module_init(self):
"""Verifying that the lookup plugin is instantiated properly.
"""
lookup = plugin.LookupModule()
module_attributes = dir(plugin)
required_attributes = [
'DOCUMENTATION',
'EXAMPLES'
]
self.assertTrue(set(required_attributes).issubset(module_attributes))
self.assertIsInstance(plugin.DOCUMENTATION, str)
self.assertIsInstance(plugin.EXAMPLES, str)
self.assertIn('run', dir(lookup))