Remove redundant test code (#3640)

These tests, when run, do not execute any `moto` code. They fail the
parameter validation check in `botocore`, which raises an exception
before ever sending a request.  These tests do not cover or verify
any `moto` behavior and have been removed.
This commit is contained in:
Brian Pandola 2021-01-31 04:21:24 -08:00 committed by GitHub
commit cd044ef00b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 18 additions and 199 deletions

View file

@ -4806,29 +4806,6 @@ def test_encryption():
conn.get_bucket_encryption(Bucket="mybucket")
@mock_s3
def test_presigned_url_restrict_parameters():
# Only specific params can be set
# Ensure error is thrown when adding custom metadata this way
bucket = str(uuid.uuid4())
key = "file.txt"
conn = boto3.resource("s3", region_name="us-east-1")
conn.create_bucket(Bucket=bucket)
s3 = boto3.client("s3", region_name="us-east-1")
# Create a pre-signed url with some metadata.
with pytest.raises(botocore.exceptions.ParamValidationError) as err:
s3.generate_presigned_url(
ClientMethod="put_object",
Params={"Bucket": bucket, "Key": key, "Unknown": "metadata"},
)
assert str(err.value).should.match(
r'Parameter validation failed:\nUnknown parameter in input: "Unknown", must be one of:.*'
)
s3.delete_bucket(Bucket=bucket)
@mock_s3
def test_presigned_put_url_with_approved_headers():
bucket = str(uuid.uuid4())