Best Python code snippet using tempest_python
test_container_services_negative.py
Source:test_container_services_negative.py
...49 container_name, metadata=metadata)50 self.assertIn('Metadata name too long', str(ex))51 @test.attr(type=["negative"])52 @test.idempotent_id('81e36922-326b-4b7c-8155-3bbceecd7a82')53 def test_create_container_metadata_value_exceeds_max_length(self):54 # Attempts to create container with metadata value55 # that is longer than max.56 max_length = self.constraints['max_meta_value_length']57 container_name = data_utils.rand_name(name='TestContainer')58 metadata_value = data_utils.arbitrary_string(size=max_length + 1)59 metadata = {'animal': metadata_value}60 ex = self.assertRaises(exceptions.BadRequest,61 self.container_client.create_container,62 container_name, metadata=metadata)63 self.assertIn('Metadata value longer than ' + str(max_length), str(ex))64 @test.attr(type=["negative"])65 @test.idempotent_id('ac666539-d566-4f02-8ceb-58e968dfb732')66 def test_create_container_metadata_exceeds_overall_metadata_count(self):67 # Attempts to create container with metadata that exceeds the...
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!!