@@ -261,7 +261,11 @@ def test_upload_deep_archive(self):
261261
262262 def test_operations_used_in_download_file (self ):
263263 self .parsed_responses = [
264- {"ContentLength" : "100" , "LastModified" : "00:00:00Z" },
264+ {
265+ "ContentLength" : "100" ,
266+ "LastModified" : "00:00:00Z" ,
267+ 'ETag' : '"foo-1"' ,
268+ },
265269 {'ETag' : '"foo-1"' , 'Body' : BytesIO (b'foo' )},
266270 ]
267271 cmdline = '%s s3://bucket/key.txt %s' % (
@@ -468,7 +472,11 @@ def test_cp_fails_with_utime_errors_but_continues(self):
468472 full_path = self .files .create_file ('foo.txt' , '' )
469473 cmdline = '%s s3://bucket/key.txt %s' % (self .prefix , full_path )
470474 self .parsed_responses = [
471- {"ContentLength" : "100" , "LastModified" : "00:00:00Z" },
475+ {
476+ "ContentLength" : "100" ,
477+ "LastModified" : "00:00:00Z" ,
478+ "ETag" : '"foo-1"' ,
479+ },
472480 {'ETag' : '"foo-1"' , 'Body' : BytesIO (b'foo' )},
473481 ]
474482 with mock .patch ('os.utime' ) as mock_utime :
@@ -486,6 +494,7 @@ def test_recursive_glacier_download_with_force_glacier(self):
486494 'LastModified' : '00:00:00Z' ,
487495 'StorageClass' : 'GLACIER' ,
488496 'Size' : 100 ,
497+ 'ETag' : '"foo-1"' ,
489498 },
490499 ],
491500 'CommonPrefixes' : [],
@@ -1326,12 +1335,14 @@ def test_ranged_download(self):
13261335 'mykey' ,
13271336 Range = mock .ANY ,
13281337 RequestPayer = 'requester' ,
1338+ IfMatch = '"foo-1"' ,
13291339 ),
13301340 self .get_object_request (
13311341 'mybucket' ,
13321342 'mykey' ,
13331343 Range = mock .ANY ,
13341344 RequestPayer = 'requester' ,
1345+ IfMatch = '"foo-1"' ,
13351346 ),
13361347 ]
13371348 )
0 commit comments