How to use test_get_config_file method in tempest

Best Python code snippet using tempest_python

test_benchmark_config.py

Source:test_benchmark_config.py Github

copy

Full Screen

...17from common import benchmark_config18from common import utils19# pylint: disable=invalid-name,unused-argument20# TODO(metzman): Figure out how to mock lru_cache here.21def test_get_config_file():22 """Test that we can get the config file of a benchmark."""23 assert benchmark_config.get_config_file(24 conftest.OSS_FUZZ_BENCHMARK_NAME) == os.path.join(25 utils.ROOT_DIR, 'benchmarks', conftest.OSS_FUZZ_BENCHMARK_NAME,26 'benchmark.yaml')27def test_get_config(oss_fuzz_benchmark):28 """Test that we can get the configuration of a benchmark."""29 assert benchmark_config.get_config(conftest.OSS_FUZZ_BENCHMARK_NAME) == (...

Full Screen

Full Screen

test_products_spider.py

Source:test_products_spider.py Github

copy

Full Screen

...4class ProductsSpiderTestCase(unittest.TestCase):5 def setUp(self) -> None:6 self.product_spider = ProductsSpider()7 self.product_spider.get_config()8 def test_get_config_file(self):9 self.assertEqual(isinstance(self.product_spider.config, dict), True) # add assertion here10 self.assertEqual(self.product_spider.config["root_url"], "https://www.manomano.fr/perceuse-1146")11 self.assertEqual(self.product_spider.config["other_pages"], [2, 3])12 logging.warning(self.product_spider.config)13 def test_build_urls(self):14 self.product_spider.build_urls()15 self.assertListEqual(self.product_spider.config["urls"], ['https://www.manomano.fr/perceuse-1146',16 'https://www.manomano.fr/perceuse-1146?page=2',17 'https://www.manomano.fr/perceuse-1146?page=3'])18 logging.warning(self.product_spider.config["urls"])19 def test_extract_info(self):20 pass21if __name__ == '__main__':22 unittest.main()

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful