Best Python code snippet using tempest_python
test_volume_quota_classes.py
Source:test_volume_quota_classes.py
...40 self.assertEqual('default', default_quotas.pop('id'))41 for key in QUOTA_KEYS:42 self.assertIn(key, default_quotas)43 @decorators.idempotent_id('a7644c63-2669-467a-b00e-452dd5c5397b')44 def test_update_default_quota(self):45 LOG.debug("Get the current default quota class values")46 body = self.admin_quota_classes_client.show_quota_class_set(47 'default')['quota_class_set']48 # Note(jeremyZ) Only include specified quota keys to avoid the conflict49 # that other tests may create/delete volume types or update volume50 # type's default quotas in concurrency running.51 update_kwargs = {key: body[key] for key in body if key in QUOTA_KEYS}52 # Restore the defaults when the test is done.53 self.addCleanup(self._restore_default_quotas, update_kwargs.copy())54 # Note(jeremyZ) Increment some of the values for updating the default55 # quota class. For safety, only items with value >= 0 will be updated,56 # and items with value < 0 (-1 means unlimited) will be ignored.57 for quota, default in update_kwargs.items():58 if default >= 0:...
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!!