Best Python code snippet using tempest_python
test_tempest_plugin.py
Source:test_tempest_plugin.py
...15from tempest.test_discover import plugins16from tempest.tests import base17from tempest.tests import fake_tempest_plugin as fake_plugin18class TestPluginDiscovery(base.TestCase):19 def test_load_tests_with_one_plugin(self):20 # we can't mock stevedore since it's a singleton and already executed21 # during test discovery. So basically this test covers the plugin loop22 # and the abstract plugin interface.23 manager = plugins.TempestTestPluginManager()24 fake_obj = fake_plugin.FakeStevedoreObj()25 manager.ext_plugins = [fake_obj]26 result = manager.get_plugin_load_tests_tuple()27 self.assertEqual(fake_plugin.FakePlugin.expected_load_test,28 result[fake_obj.name])29 def test_load_tests_with_two_plugins(self):30 manager = plugins.TempestTestPluginManager()31 obj1 = fake_plugin.FakeStevedoreObj('fake01')32 obj2 = fake_plugin.FakeStevedoreObj('fake02')33 manager.ext_plugins = [obj1, obj2]...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!