Best Python code snippet using tempest_python
test_migrations.py
Source:test_migrations.py
...53 pass54 @test.idempotent_id('33f1fec3-ba18-4470-8e4e-1d888e7c3593')55 @testtools.skipUnless(CONF.compute_feature_enabled.resize,56 'Resize not available.')57 def test_resize_server_revert_deleted_flavor(self):58 # Tests that we can revert the resize on an instance whose original59 # flavor has been deleted.60 # First we have to create a flavor that we can delete so make a copy61 # of the normal flavor from which we'd create a server.62 flavor = self.flavors_admin_client.show_flavor(63 self.flavor_ref)['flavor']64 flavor = self.flavors_admin_client.create_flavor(65 name=data_utils.rand_name('test_resize_flavor_'),66 ram=flavor['ram'],67 disk=flavor['disk'],68 vcpus=flavor['vcpus']69 )['flavor']70 self.addCleanup(self._flavor_clean_up, flavor['id'])71 # Now boot a server with the copied flavor....
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!!