Fix: broken build with release of botocore 1.19.62 (#3628)

The latest release of `botocore` (1.19.62) makes changes to the parameter
validation code, which for some reason was also covered by a couple of
`moto` tests.

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.

Ref: ff8ae76ecc

Closes #3627
This commit is contained in:
Brian Pandola 2021-01-29 01:06:25 -08:00 committed by GitHub
commit cd25ab7a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 42 deletions

View file

@ -8,7 +8,7 @@ import sure # noqa
import datetime
import uuid
from botocore.exceptions import ClientError, ParamValidationError
from botocore.exceptions import ClientError
import pytest
from moto import mock_ec2, mock_ssm
@ -937,25 +937,6 @@ def test_describe_parameters_invalid_path(value):
msg.should.contain("Valid example: /get/parameters2-/by1./path0_.")
@pytest.mark.parametrize(
"filters,error_msg",
[
([{}], 'Missing required parameter in ParameterFilters[0]: "Key"',),
(
[{"Key": "Name", "Values": []}],
"Invalid length for parameter ParameterFilters[0].Values, value: 0, valid range: 1-inf",
),
],
)
@mock_ssm
def test_describe_parameters_parameter_validation(filters, error_msg):
client = boto3.client("ssm", region_name="us-east-1")
with pytest.raises(ParamValidationError) as e:
client.describe_parameters(ParameterFilters=filters)
e.value.kwargs["report"].should.contain(error_msg)
@mock_ssm
def test_describe_parameters_attributes():
client = boto3.client("ssm", region_name="us-east-1")