How to use unset_flavor_extra_spec method in tempest

Best Python code snippet using tempest_python

test_flavors_extra_specs.py

Source:test_flavors_extra_specs.py Github

copy

Full Screen

...70 self.assertEqual(get_resp.status, 200)71 self.assertEqual(get_body, specs)72 # UNSET extra specs that were set in this test73 unset_resp, _ = \74 self.client.unset_flavor_extra_spec(self.flavor['id'], "key1")75 self.assertEqual(unset_resp.status, 200)76 @attr(type=['negative', 'gate'])77 def test_flavor_non_admin_set_keys(self):78 # Test to SET flavor extra spec as a user without admin privileges.79 specs = {"key1": "value1", "key2": "value2"}80 self.assertRaises(exceptions.Unauthorized,81 self.flavors_client.set_flavor_extra_spec,82 self.flavor['id'],83 specs)84 @attr(type='gate')85 def test_flavor_non_admin_get_keys(self):86 specs = {"key1": "value1", "key2": "value2"}87 set_resp, set_body = self.client.set_flavor_extra_spec(88 self.flavor['id'], specs)...

Full Screen

Full Screen

test_flavor_extra_specs_rbac.py

Source:test_flavor_extra_specs_rbac.py Github

copy

Full Screen

...67 @decorators.idempotent_id('4b0e5471-e010-4c09-8965-80898e6760a3')68 @rbac_rule_validation.action(69 service="nova",70 rules=["os_compute_api:os-flavor-extra-specs:delete"])71 def test_unset_flavor_extra_spec(self):72 key = self._set_flavor_extra_spec()73 with self.override_role():74 self.flavors_client.unset_flavor_extra_spec(self.flavor['id'], key)75 @decorators.idempotent_id('02c3831a-3ce9-476e-a722-d805ac2da621')76 @rbac_rule_validation.action(77 service="nova",78 rules=["os_compute_api:os-flavor-extra-specs:index"])79 def test_list_flavor_extra_specs(self):80 self._set_flavor_extra_spec()81 with self.override_role():...

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