File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 8282 ],
8383 },
8484]
85+
86+ MOCK_COPY_OBJECT_RESPONSE = {
87+ "CopyObjectResult" : {
88+ "ETag" : '"d41d8cd98f00b204e9800998ecf8427e"' ,
89+ "LastModified" : "2024-06-01T12:34:56.000Z"
90+ },
91+ "Expiration" : "expiry-date=\" 2024-12-31T23:59:59Z\" , rule-id=\" rule1\" " ,
92+ "CopySourceVersionId" : "source-version-id" ,
93+ "VersionId" : "new-version-id" ,
94+ "ResponseMetadata" : {
95+ "RequestId" : "EXAMPLE123456789" ,
96+ "HostId" : "EXAMPLEHostId" ,
97+ "HTTPStatusCode" : 200 ,
98+ "HTTPHeaders" : {
99+ "x-amz-id-2" : "EXAMPLEid2" ,
100+ "x-amz-request-id" : "EXAMPLErequestid" ,
101+ "date" : "Mon, 01 Jun 2024 12:34:56 GMT" ,
102+ "etag" : '"d41d8cd98f00b204e9800998ecf8427e"' ,
103+ "content-length" : "123" ,
104+ "server" : "AmazonS3"
105+ },
106+ "RetryAttempts" : 0
107+ }
108+ }
Original file line number Diff line number Diff line change 4242 NAME_WITH_ACCENT_NFC_FORM ,
4343 NAME_WITH_ACCENT_NFD_FORM ,
4444)
45+ from unit .helpers .data .s3_responses import MOCK_COPY_OBJECT_RESPONSE
4546from utils .exceptions import (
4647 BulkUploadException ,
4748 DocumentInfectedException ,
@@ -712,8 +713,8 @@ def test_handle_sqs_message_rollback_transaction_when_validation_pass_but_file_t
712713
713714 # simulate a client error occur when copying the 3rd file
714715 repo_under_test .bulk_upload_s3_repository .copy_to_lg_bucket .side_effect = [
715- None ,
716- None ,
716+ MOCK_COPY_OBJECT_RESPONSE ,
717+ MOCK_COPY_OBJECT_RESPONSE ,
717718 mock_client_error ,
718719 ]
719720
You can’t perform that action at this time.
0 commit comments