From ec3b1ab0d991013a03025403eaf698c4f43e1a5b Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Mon, 19 Apr 2021 15:22:07 +0200 Subject: [PATCH] Tests of lookup plugin initiation for glance_images.py Closes-Bug: #1922726 Signed-off-by: Jiri Podivin Change-Id: Ib730c4bff12404b6c533db867531b2406f52eafc --- .../lookup_plugins/test_glance_images.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tripleo_validations/tests/lookup_plugins/test_glance_images.py b/tripleo_validations/tests/lookup_plugins/test_glance_images.py index 6e4d6e1bb..3b3abd16c 100644 --- a/tripleo_validations/tests/lookup_plugins/test_glance_images.py +++ b/tripleo_validations/tests/lookup_plugins/test_glance_images.py @@ -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))