Skip to content

Commit a66905b

Browse files
author
Rakshil Modi
committed
Code cleanup
1 parent df63b36 commit a66905b

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

awscli/customizations/s3/subcommands.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,6 @@ def run(self):
13461346
}
13471347
result_queue = queue.Queue()
13481348
operation_name = cmd_translation[paths_type]
1349-
LOGGER.debug("OPERATION TYPE %s",operation_name)
13501349

13511350
fgen_kwargs = {
13521351
'client': self._source_client,

tests/functional/s3/test_cp_command.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ def test_operations_used_in_recursive_download(self):
296296
)
297297
self.assertEqual(self.operations_called[0][0].name, 'ListObjectsV2')
298298

299-
def test_no_overwrite_flag_when_object_not_exists_on_target(self):
300-
"""Test when object with different key is successsfully uploaded using no-overwrite"""
299+
def test_for_no_overwrite_flag_when_object_not_exists_on_target(self):
300+
"""Testing when object with different key is successsfully uploaded using no-overwrite"""
301301
full_path = self.files.create_file('foo.txt', 'mycontent')
302-
cmdline = '%s %s s3://bucket/key.txt --no-overwrite' % ( self.prefix,full_path)
302+
cmdline = '%s %s s3://bucket --no-overwrite' % ( self.prefix,full_path)
303303
self.parsed_responses = [
304304
{'ETag': '"c8afdb36c52cf4727836669019e69222"'}
305305
]
@@ -312,10 +312,10 @@ def test_no_overwrite_flag_when_object_not_exists_on_target(self):
312312
# Verify the IfNoneMatch condition was set in the request
313313
self.assertEqual(self.operations_called[0][1]['IfNoneMatch'], '*')
314314

315-
def test_no_overwrite_flag_when_object_exists_on_target(self):
316-
"""Test warning message when object already exists using no-overwrite"""
315+
def test_for_no_overwrite_flag_when_object_exists_on_target(self):
316+
"""Testing when object already exists using no-overwrite"""
317317
full_path = self.files.create_file('foo.txt', 'mycontent')
318-
cmdline = '%s %s s3://bucket/key.txt --no-overwrite' % ( self.prefix,full_path)
318+
cmdline = '%s %s s3://bucket --no-overwrite' % ( self.prefix,full_path)
319319
# Set up the response to simulate a PreconditionFailed error
320320
self.http_response.status_code = 412
321321
self.parsed_responses = [
@@ -332,11 +332,11 @@ def test_no_overwrite_flag_when_object_exists_on_target(self):
332332
self.assertEqual(self.operations_called[0][0].name, 'PutObject')
333333
self.assertEqual(self.operations_called[0][1]['IfNoneMatch'], '*')
334334

335-
def test_no_overwrite_flag_multipart_upload_when_object_not_exists_on_target(self):
336-
"""Test multipart upload with no-overwrite flag when object doesn't exist"""
335+
def test_for_no_overwrite_flag_multipart_upload_when_object_not_exists_on_target(self):
336+
"""Testing multipart upload with no-overwrite flag when object doesn't exist"""
337337
# Create a large file that will trigger multipart upload
338338
full_path = self.files.create_file('foo.txt', 'a' * 10 * (1024**2))
339-
cmdline = '%s %s s3://bucket/key.txt --no-overwrite' % (self.prefix, full_path)
339+
cmdline = '%s %s s3://bucket --no-overwrite' % (self.prefix, full_path)
340340

341341
# Set up responses for multipart upload
342342
self.parsed_responses = [
@@ -358,7 +358,6 @@ def test_no_overwrite_flag_multipart_upload_when_object_not_exists_on_target(sel
358358
# Verify the IfNoneMatch condition was set in the CompleteMultipartUpload request
359359
self.assertEqual(self.operations_called[3][1]['IfNoneMatch'], '*')
360360

361-
362361
def test_dryrun_download(self):
363362
self.parsed_responses = [self.head_object_response()]
364363
target = self.files.full_path('file.txt')

0 commit comments

Comments
 (0)