Best Python code snippet using tempest_python
test_container_acl.py
Source:test_container_acl.py
...36 def tearDown(self):37 self.delete_containers([self.container_name])38 super(ObjectTestACLs, self).tearDown()39 @test.idempotent_id('a3270f3f-7640-4944-8448-c7ea783ea5b6')40 def test_read_object_with_rights(self):41 # attempt to read object using authorized user42 # update X-Container-Read metadata ACL43 tenant_name = self.os_operator.credentials.tenant_name44 username = self.os_operator.credentials.username45 cont_headers = {'X-Container-Read': tenant_name + ':' + username}46 resp_meta, body = self.container_client.update_container_metadata(47 self.container_name, metadata=cont_headers,48 metadata_prefix='')49 self.assertHeaders(resp_meta, 'Container', 'POST')50 # create object51 object_name = data_utils.rand_name(name='Object')52 resp, _ = self.object_client.create_object(self.container_name,53 object_name, 'data')54 self.assertHeaders(resp, 'Object', 'PUT')...
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!!