Best Python code snippet using localstack_python
test_s3.py
Source:test_s3.py
...150 """151 Test to cover DEEP_ARCHIVE Storage Class functionality.152 """153 @pytest.mark.aws_validated154 def test_storage_class_deep_archive(self, s3_client, s3_resource, s3_bucket, tmpdir):155 key = "my-key"156 config = TransferConfig(multipart_threshold=5 * KB, multipart_chunksize=1 * KB)157 def upload_file(size_in_kb: int):158 file = tmpdir / f"test-file-{short_uid()}.bin"159 data = b"1" * (size_in_kb * KB)160 file.write(data=data, mode="w")161 s3_client.upload_file(162 Bucket=s3_bucket,163 Key=key,164 Filename=str(file.realpath()),165 ExtraArgs={"StorageClass": "DEEP_ARCHIVE"},166 Config=config,167 )168 upload_file(1)...
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!!