@@ -412,29 +412,33 @@ def test_validate_checksum_algorithm_sync_download_error(self):
412
412
paths = ['s3://bucket/key' , self .file_creator .rootdir ]
413
413
parameters = {'checksum_algorithm' : 'CRC32C' }
414
414
cmd_params = CommandParameters ('sync' , parameters , '' )
415
- with self .assertRaises (ParamValidationError ):
415
+ with self .assertRaises (ParamValidationError ) as cm :
416
416
cmd_params .add_paths (paths )
417
+ self .assertIn ('Expected checksum-algorithm parameter to be used with one of following path formats' , cm .msg )
417
418
418
419
def test_validate_checksum_mode_upload_error (self ):
419
420
paths = [self .file_creator .rootdir , 's3://bucket/key' ]
420
421
parameters = {'checksum_mode' : 'ENABLED' }
421
422
cmd_params = CommandParameters ('cp' , parameters , '' )
422
- with self .assertRaises (ParamValidationError ):
423
+ with self .assertRaises (ParamValidationError ) as cm :
423
424
cmd_params .add_paths (paths )
425
+ self .assertIn ('Expected checksum-mode parameter to be used with one of following path formats' , cm .msg )
424
426
425
427
def test_validate_checksum_mode_sync_upload_error (self ):
426
428
paths = [self .file_creator .rootdir , 's3://bucket/key' ]
427
429
parameters = {'checksum_mode' : 'ENABLED' }
428
430
cmd_params = CommandParameters ('sync' , parameters , '' )
429
- with self .assertRaises (ParamValidationError ):
431
+ with self .assertRaises (ParamValidationError ) as cm :
430
432
cmd_params .add_paths (paths )
433
+ self .assertIn ('Expected checksum-mode parameter to be used with one of following path formats' , cm .msg )
431
434
432
435
def test_validate_checksum_mode_move_error (self ):
433
436
paths = ['s3://bucket/key' , 's3://bucket2/key' ]
434
437
parameters = {'checksum_mode' : 'ENABLED' }
435
438
cmd_params = CommandParameters ('mv' , parameters , '' )
436
- with self .assertRaises (ParamValidationError ):
439
+ with self .assertRaises (ParamValidationError ) as cm :
437
440
cmd_params .add_paths (paths )
441
+ self .assertIn ('Expected checksum-mode parameter to be used with one of following path formats' , cm .msg )
438
442
439
443
def test_validate_streaming_paths_error (self ):
440
444
parameters = {'src' : '-' , 'dest' : 's3://bucket' }
0 commit comments