Techdebt: Remove sure import if not used by service (#6643)
This commit is contained in:
parent
5765201128
commit
560162336f
@ -1,12 +1,12 @@
|
|||||||
"""Unit tests for lambda-supported APIs."""
|
"""Unit tests for lambda-supported APIs."""
|
||||||
import boto3
|
from uuid import uuid4
|
||||||
import pytest
|
|
||||||
import sure # noqa # pylint: disable=unused-import
|
|
||||||
|
|
||||||
|
import boto3
|
||||||
from botocore.exceptions import ClientError
|
from botocore.exceptions import ClientError
|
||||||
|
import pytest
|
||||||
|
|
||||||
from moto import mock_lambda
|
from moto import mock_lambda
|
||||||
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
|
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
|
||||||
from uuid import uuid4
|
|
||||||
from .utilities import (
|
from .utilities import (
|
||||||
get_role_name,
|
get_role_name,
|
||||||
get_test_zip_file1,
|
get_test_zip_file1,
|
||||||
@ -195,9 +195,9 @@ def test_aliases_are_unique_per_function():
|
|||||||
|
|
||||||
err = exc.value.response["Error"]
|
err = exc.value.response["Error"]
|
||||||
assert err["Code"] == "ConflictException"
|
assert err["Code"] == "ConflictException"
|
||||||
assert (
|
assert err["Message"] == (
|
||||||
err["Message"]
|
f"Alias already exists: arn:aws:lambda:us-west-1:{ACCOUNT_ID}"
|
||||||
== f"Alias already exists: arn:aws:lambda:us-west-1:{ACCOUNT_ID}:function:{function_name}:alias1"
|
f":function:{function_name}:alias1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -278,9 +278,9 @@ def test_get_unknown_alias():
|
|||||||
client.get_alias(FunctionName=function_name, Name="unknown")
|
client.get_alias(FunctionName=function_name, Name="unknown")
|
||||||
err = exc.value.response["Error"]
|
err = exc.value.response["Error"]
|
||||||
assert err["Code"] == "ResourceNotFoundException"
|
assert err["Code"] == "ResourceNotFoundException"
|
||||||
assert (
|
assert err["Message"] == (
|
||||||
err["Message"]
|
f"Cannot find alias arn: arn:aws:lambda:us-west-1:{ACCOUNT_ID}"
|
||||||
== f"Cannot find alias arn: arn:aws:lambda:us-west-1:{ACCOUNT_ID}:function:{function_name}:unknown"
|
f":function:{function_name}:unknown"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
|
"""Test the different server responses."""
|
||||||
import re
|
import re
|
||||||
import sure # noqa # pylint: disable=unused-import
|
|
||||||
import xmltodict
|
import xmltodict
|
||||||
|
|
||||||
import moto.server as server
|
import moto.server as server
|
||||||
from tests import EXAMPLE_AMI_ID
|
from tests import EXAMPLE_AMI_ID
|
||||||
|
|
||||||
"""
|
|
||||||
Test the different server responses
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
def test_ec2_server_get():
|
def test_ec2_server_get():
|
||||||
backend = server.create_backend_app("ec2")
|
backend = server.create_backend_app("ec2")
|
||||||
|
Loading…
Reference in New Issue
Block a user