Best Python code snippet using tempest_python
test_backends_capabilities.py
Source:test_backends_capabilities.py
...36 ]37 @test.idempotent_id('3750af44-5ea2-4cd4-bc3e-56e7e6caf854')38 def test_get_capabilities_backend(self):39 # Test backend properties40 backend = self.admin_volume_client.show_backend_capabilities(41 self.hosts[0])42 # Verify getting capabilities parameters from a backend43 for key in self.CAPABILITIES:44 self.assertIn(key, backend)45 @test.idempotent_id('a9035743-d46a-47c5-9cb7-3c80ea16dea0')46 def test_compare_volume_stats_values(self):47 # Test values comparison between show_backend_capabilities48 # to show_pools49 VOLUME_STATS = ('vendor_name',50 'volume_backend_name',51 'storage_protocol')52 # Get list backend capabilities using show_pools53 cinder_pools = [54 pool['capabilities'] for pool in55 self.admin_volume_client.show_pools(detail=True)['pools']56 ]57 # Get list backends capabilities using show_backend_capabilities58 capabilities = [59 self.admin_volume_client.show_backend_capabilities(60 host=host) for host in self.hosts61 ]62 # Returns a tuple of VOLUME_STATS values63 expected_list = map(operator.itemgetter(*VOLUME_STATS),64 cinder_pools)65 observed_list = map(operator.itemgetter(*VOLUME_STATS),66 capabilities)...
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!!