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

@ -395,7 +395,6 @@ def test_generate_data_key_decrypt():
dict(KeySpec="AES_257"),
dict(KeySpec="AES_128", NumberOfBytes=16),
dict(NumberOfBytes=2048),
dict(NumberOfBytes=0),
dict(),
],
)
@ -404,9 +403,7 @@ def test_generate_data_key_invalid_size_params(kwargs):
client = boto3.client("kms", region_name="us-east-1")
key = client.create_key(Description="generate-data-key-size")
with pytest.raises(
(botocore.exceptions.ClientError, botocore.exceptions.ParamValidationError)
) as err:
with pytest.raises(botocore.exceptions.ClientError):
client.generate_data_key(KeyId=key["KeyMetadata"]["KeyId"], **kwargs)
@ -538,13 +535,7 @@ def test_generate_random(number_of_bytes):
@pytest.mark.parametrize(
"number_of_bytes,error_type",
[
(2048, botocore.exceptions.ClientError),
(1025, botocore.exceptions.ClientError),
(0, botocore.exceptions.ParamValidationError),
(-1, botocore.exceptions.ParamValidationError),
(-1024, botocore.exceptions.ParamValidationError),
],
[(2048, botocore.exceptions.ClientError), (1025, botocore.exceptions.ClientError),],
)
@mock_kms
def test_generate_random_invalid_number_of_bytes(number_of_bytes, error_type):