Best Python code snippet using tempest_python
test_volumes_backup.py
Source:test_volumes_backup.py
...30 self.admin_backups_client.delete_backup(backup_id)31 self.admin_backups_client.wait_for_resource_deletion(backup_id)32 def _decode_url(self, backup_url):33 return json.loads(base64.decode_as_text(backup_url))34 def _encode_backup(self, backup):35 retval = json.dumps(backup)36 return base64.encode_as_text(retval)37 def _modify_backup_url(self, backup_url, changes):38 backup = self._decode_url(backup_url)39 backup.update(changes)40 return self._encode_backup(backup)41 @decorators.idempotent_id('a99c54a1-dd80-4724-8a13-13bf58d4068d')42 def test_volume_backup_export_import(self):43 """Test backup export import functionality.44 Cinder allows exporting DB backup information through its API so it can45 be imported back in case of a DB loss.46 """47 volume = self.create_volume()48 # Create backup49 backup_name = data_utils.rand_name(self.__class__.__name__ + '-Backup')50 backup = (self.create_backup(backup_client=self.admin_backups_client,51 volume_id=volume['id'],52 name=backup_name))53 self.assertEqual(backup_name, backup['name'])54 # Export Backup...
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!!