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

@ -11,7 +11,7 @@ import re
import sure # noqa
import boto3
from botocore.exceptions import ClientError, ParamValidationError
from botocore.exceptions import ClientError
from dateutil.tz import tzlocal
from moto import mock_ecr
@ -721,26 +721,6 @@ def test_batch_get_image_that_doesnt_exist():
response["failures"][0]["imageId"]["imageTag"].should.equal("v5")
@mock_ecr
def test_batch_get_image_no_tags():
client = boto3.client("ecr", region_name="us-east-1")
_ = client.create_repository(repositoryName="test_repository")
_ = client.put_image(
repositoryName="test_repository",
imageManifest=json.dumps(_create_image_manifest()),
imageTag="latest",
)
error_msg = re.compile(
r".*Missing required parameter in input: \"imageIds\".*", re.MULTILINE
)
client.batch_get_image.when.called_with(
repositoryName="test_repository"
).should.throw(ParamValidationError, error_msg)
@mock_ecr
def test_batch_delete_image_by_tag():
client = boto3.client("ecr", region_name="us-east-1")