How to use test_delete_object_without_write_rights method in tempest

Best Python code snippet using tempest_python

test_container_acl_negative.py

Source:test_container_acl_negative.py Github

copy

Full Screen

...166 self.custom_object_client.create_object,167 self.container_name,168 object_name, 'data')169 @test.attr(type=['negative', 'smoke'])170 def test_delete_object_without_write_rights(self):171 # attempt to delete object using non-authorized user172 # update X-Container-Read and X-Container-Write metadata ACL173 cont_headers = {'X-Container-Read':174 self.data.test_tenant + ':' + self.data.test_user,175 'X-Container-Write': ''}176 resp_meta, body = self.container_client.update_container_metadata(177 self.container_name, metadata=cont_headers,178 metadata_prefix='')179 self.assertHeaders(resp_meta, 'Container', 'POST')180 # create object181 object_name = data_utils.rand_name(name='Object')182 resp, _ = self.object_client.create_object(self.container_name,183 object_name, 'data')184 self.assertHeaders(resp, 'Object', 'PUT')...

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