#4018 - Raise NoSuchUpload when listing a non-existing multipart upload (#4031)

This commit is contained in:
Bert Blommers 2021-06-24 08:14:28 +01:00 committed by GitHub
commit 4778377e8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 4 deletions

View file

@ -2310,7 +2310,12 @@ def test_s3_abort_multipart_data_with_invalid_upload_and_key():
client.abort_multipart_upload(
Bucket="blah", Key="foobar", UploadId="dummy_upload_id"
)
err.value.response["Error"]["Code"].should.equal("NoSuchUpload")
err = err.value.response["Error"]
err["Code"].should.equal("NoSuchUpload")
err["Message"].should.equal(
"The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed."
)
err["UploadId"].should.equal("dummy_upload_id")
@mock_s3