How to use test_metadata_items_limit method in tempest

Best Python code snippet using tempest_python

test_server_metadata_negative.py

Source:test_server_metadata_negative.py Github

copy

Full Screen

...100 self.client.delete_server_metadata_item,101 non_existent_server_id,102 'd')103 @test.attr(type=['negative', 'gate'])104 def test_metadata_items_limit(self):105 # A 403 Forbidden or 413 Overlimit (old behaviour) exception106 # will be raised while exceeding metadata items limit for107 # tenant.108 _, quota_set = self.quotas.get_quota_set(self.tenant_id)109 quota_metadata = quota_set['metadata_items']110 if quota_metadata == -1:111 raise self.skipException("No limit for metadata_items")112 req_metadata = {}113 for num in range(1, quota_metadata + 2):114 req_metadata['key' + str(num)] = 'val' + str(num)115 self.assertRaises((exceptions.OverLimit, exceptions.Unauthorized),116 self.client.set_server_metadata,117 self.server_id, req_metadata)118 # A 403 Forbidden or 413 Overlimit (old behaviour) exception...

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