Repository: getmoto/moto
Pull request #6484 (2023-07-05 14:31:07)

SSM: Fix bad state caused by invalid PutParameter request
This PR fixes an issue where if PutParameter is called without parameter type, it creates an invalid state within SSM. Consequently, all calls to DescribeParameters break.

It is caused by peeking into a default dict which creates an empty list, which itself is the invalid state.

```
$ awslocal ssm put-parameter --name foo --value bar

An error occurred (ValidationException) when calling the PutParameter operation: A parameter type is required when you create a parameter.
```

```
$ awslocal ssm describe-parameters

An error occurred (InternalError) when calling the DescribeParameters operation (reached max retries: 4): exception while calling ssm.DescribeParameters: Traceback (most recent call last):
  File "/home/viren/repo/localstack/localstack/aws/chain.py", line 90, in handle
    handler(self, self.context, response)
  File "/home/viren/repo/localstack/localstack/aws/handlers/service.py", line 123, in __call__
    handler(chain, context, response)
  File "/home/viren/repo/localstack/localstack/aws/handlers/service.py", line 93, in __call__
    skeleton_response = self.skeleton.invoke(context)
  File "/home/viren/repo/localstack/localstack/aws/skeleton.py", line 154, in invoke
    return self.dispatch_request(context, instance)
  File "/home/viren/repo/localstack/localstack/aws/skeleton.py", line 166, in dispatch_request
    result = handler(context, instance) or {}
  File "/home/viren/repo/localstack/localstack/aws/forwarder.py", line 67, in _call
    return fallthrough_handler(context, req)
  File "/home/viren/repo/localstack/localstack/services/moto.py", line 83, in _proxy_moto
    return call_moto(context)
  File "/home/viren/repo/localstack/localstack/services/moto.py", line 46, in call_moto
    return dispatch_to_backend(context, dispatch_to_moto, include_response_metadata)
  File "/home/viren/repo/localstack/localstack/aws/forwarder.py", line 120, in dispatch_to_backend
    http_response = http_request_dispatcher(context)
  File "/home/viren/repo/localstack/localstack/services/moto.py", line 111, in dispatch_to_moto
    response = dispatch(request, request.url, request.headers)
  File "/home/viren/repo/moto-ext/moto/core/responses.py", line 231, in dispatch
    return cls()._dispatch(*args, **kwargs)
  File "/home/viren/repo/moto-ext/moto/core/responses.py", line 375, in _dispatch
    return self.call_action()
  File "/home/viren/repo/moto-ext/moto/core/responses.py", line 464, in call_action
    response = method()
  File "/home/viren/repo/moto-ext/moto/ssm/responses.py", line 250, in describe_parameters
    result = self.ssm_backend.describe_parameters(filters, parameter_filters)
  File "/home/viren/repo/moto-ext/moto/ssm/models.py", line 1565, in describe_parameters
    ssm_parameter: Parameter = self.get_parameter(param_name)  # type: ignore[assignment]
  File "/home/viren/repo/moto-ext/moto/ssm/models.py", line 1927, in get_parameter
    return self._parameters[name][-1]
IndexError: list index out of range
```

Related: https://github.com/getmoto/moto/pull/6436


Patch:
diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py
index 9107e1ac5..d759060c5 100644
--- a/moto/awslambda/exceptions.py
+++ b/moto/awslambda/exceptions.py
@@ -89,3 +89,9 @@ class UnknownPolicyException(LambdaClientError):
             "ResourceNotFoundException",
             "No policy is associated with the given resource.",
         )
+
+
+class ValidationException(LambdaClientError):
+    def __init__(self, value: str, property_name: str, specific_message: str):
+        message = f"1 validation error detected: Value '{value}' at '{property_name}' failed to satisfy constraint: {specific_message}"
+        super().__init__("ValidationException", message)
diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py
index 2aa35c9d0..75bbac5c1 100644
--- a/moto/awslambda/models.py
+++ b/moto/awslambda/models.py
@@ -45,6 +45,7 @@ from .exceptions import (
     UnknownLayerVersionException,
     UnknownFunctionException,
     UnknownAliasException,
+    ValidationException,
 )
 from .utils import (
     make_function_arn,
@@ -196,6 +197,22 @@ def _validate_s3_bucket_and_key(
     return key
 
 
+class ImageConfig:
+    def __init__(self, config: Dict[str, Any]) -> None:
+        self.cmd = config.get("Command", [])
+        self.entry_point = config.get("EntryPoint", [])
+        self.working_directory = config.get("WorkingDirectory", "")
+
+    def response(self) -> Dict[str, Any]:
+        return dict(
+            {
+                "Command": self.cmd,
+                "EntryPoint": self.entry_point,
+                "WorkingDirectory": self.working_directory,
+            }
+        )
+
+
 class Permission(CloudFormationModel):
     def __init__(self, region: str):
         self.region = region
@@ -429,6 +446,10 @@ class LambdaFunction(CloudFormationModel, DockerModel):
         self.reserved_concurrency = spec.get("ReservedConcurrentExecutions", None)
 
         # optional
+        self.ephemeral_storage: str
+        self.code_digest: str
+        self.code_bytes: bytes
+
         self.description = spec.get("Description", "")
         self.memory_size = spec.get("MemorySize", 128)
         self.package_type = spec.get("PackageType", None)
@@ -439,6 +460,13 @@ class LambdaFunction(CloudFormationModel, DockerModel):
         self.signing_job_arn = spec.get("SigningJobArn")
         self.code_signing_config_arn = spec.get("CodeSigningConfigArn")
         self.tracing_config = spec.get("TracingConfig") or {"Mode": "PassThrough"}
+        self.architectures: List[str] = spec.get("Architectures", ["x86_64"])
+        self.image_config: ImageConfig = ImageConfig(spec.get("ImageConfig", {}))
+        _es = spec.get("EphemeralStorage")
+        if _es:
+            self.ephemeral_storage = _es["Size"]
+        else:
+            self.ephemeral_storage = 512
 
         self.logs_group_name = f"/aws/lambda/{self.function_name}"
 
@@ -531,6 +559,41 @@ class LambdaFunction(CloudFormationModel, DockerModel):
             datetime.datetime.utcnow()
         )
 
+    @property
+    def architectures(self) -> List[str]:
+        return self._architectures
+
+    @architectures.setter
+    def architectures(self, architectures: List[str]) -> None:
+        if (
+            len(architectures) > 1
+            or not architectures
+            or architectures[0] not in ("x86_64", "arm64")
+        ):
+            raise ValidationException(
+                str(architectures),
+                "architectures",
+                "Member must satisfy constraint: "
+                "[Member must satisfy enum value set: [x86_64, arm64], Member must not be null]",
+            )
+        self._architectures = architectures
+
+    @property
+    def ephemeral_storage(self) -> int:
+        return self._ephemeral_storage
+
+    @ephemeral_storage.setter
+    def ephemeral_storage(self, ephemeral_storage: int) -> None:
+        if ephemeral_storage > 10240:
+            raise ValidationException(
+                str(ephemeral_storage),
+                "ephemeralStorage.size",
+                "Member must have value less than or equal to 10240",
+            )
+
+        # ephemeral_storage < 512 is handled by botocore 1.30.0
+        self._ephemeral_storage = ephemeral_storage
+
     @property
     def vpc_config(self) -> Dict[str, Any]:  # type: ignore[misc]
         config = self._vpc_config.copy()
@@ -582,7 +645,16 @@ class LambdaFunction(CloudFormationModel, DockerModel):
             "SigningProfileVersionArn": self.signing_profile_version_arn,
             "SigningJobArn": self.signing_job_arn,
             "TracingConfig": self.tracing_config,
+            "Architectures": self.architectures,
+            "EphemeralStorage": {
+                "Size": self.ephemeral_storage,
+            },
+            "SnapStart": {"ApplyOn": "None", "OptimizationStatus": "Off"},
         }
+        if self.package_type == "Image":
+            config["ImageConfigResponse"] = {
+                "ImageConfig": self.image_config.response(),
+            }
         if not on_create:
             # Only return this variable after the first creation
             config["LastUpdateStatus"] = "Successful"
diff --git a/moto/iam/models.py b/moto/iam/models.py
index a41c76214..a837fa797 100644
--- a/moto/iam/models.py
+++ b/moto/iam/models.py
@@ -1823,7 +1823,13 @@ class IAMBackend(BaseBackend):
 
     def attach_role_policy(self, policy_arn: str, role_name: str) -> None:
         arns = dict((p.arn, p) for p in self.managed_policies.values())
-        policy = arns[policy_arn]
+        try:
+            policy = arns[policy_arn]
+        except KeyError:
+            raise IAMNotFoundException(
+                f"Policy {policy_arn} does not exist or is not attachable."
+            )
+
         policy.attach_to(self.get_role(role_name))
 
     def update_role_description(self, role_name: str, role_description: str) -> Role:
@@ -1891,7 +1897,9 @@ class IAMBackend(BaseBackend):
         try:
             policy = arns[policy_arn]
         except KeyError:
-            raise IAMNotFoundException(f"Policy {policy_arn} was not found.")
+            raise IAMNotFoundException(
+                f"Policy {policy_arn} does not exist or is not attachable."
+            )
         policy.attach_to(self.get_user(user_name))
 
     def detach_user_policy(self, policy_arn: str, user_name: str) -> None:
diff --git a/moto/route53/responses.py b/moto/route53/responses.py
index 647166fd1..4c43eddf3 100644
--- a/moto/route53/responses.py
+++ b/moto/route53/responses.py
@@ -81,6 +81,9 @@ class Route53(BaseResponse):
                 delegation_set_id=delegation_set_id,
             )
             template = Template(CREATE_HOSTED_ZONE_RESPONSE)
+            headers = {
+                "Location": f"https://route53.amazonaws.com/2013-04-01/hostedzone/{new_zone.id}"
+            }
             return 201, headers, template.render(zone=new_zone)
 
         elif request.method == "GET":
diff --git a/moto/ssm/models.py b/moto/ssm/models.py
index d88deb808..1ffc1a9d5 100644
--- a/moto/ssm/models.py
+++ b/moto/ssm/models.py
@@ -2062,7 +2062,11 @@ class SimpleSystemManagerBackend(BaseBackend):
                     "formed as a mix of letters, numbers and the following 3 symbols .-_"
                 )
             raise ValidationException(invalid_prefix_error)
-        if not parameter_type and not overwrite and not self._parameters[name]:
+        if (
+            not parameter_type
+            and not overwrite
+            and not (name in self._parameters and self._parameters[name])
+        ):
             raise ValidationException(
                 "A parameter type is required when you create a parameter."
             )


Test patch:
diff --git a/tests/helpers.py b/tests/helpers.py
index 34341464d..b7614b93d 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,41 +1,8 @@
-from collections.abc import Iterable, Mapping
 from uuid import UUID
 
 from sure import assertion
 
 
-@assertion
-def containing_item_with_attributes(context, **kwargs):
-    contains = False
-    if kwargs and isinstance(context.obj, Iterable):
-        for item in context.obj:
-            if not isinstance(item, dict):
-                continue
-            for k, v in kwargs.items():
-                if k not in item or item[k] != v:
-                    break
-            else:
-                contains = True
-    if context.negative:
-        assert not contains, f"{context.obj} contains matching item {kwargs}"
-    else:
-        assert contains, f"{context.obj} does not contain matching item {kwargs}"
-    return True
-
-
-@assertion
-def match_dict(context, dict_value):
-    assert isinstance(dict_value, Mapping), f"Invalid match target value: {dict_value}"
-    assert isinstance(
-        context.obj, Mapping
-    ), f"Expected dict like object, but got: {context.obj}"
-
-    for k, v in dict_value.items():
-        assert k in context.obj, f"No such key '{k}' in {context.obj}"
-        context.obj[k].should.equal(v)
-    return True
-
-
 @assertion
 def match_uuid4(context):
     try:
diff --git a/tests/terraformtests/README.md b/tests/terraformtests/README.md
index ea386aa80..9b36f6e27 100644
--- a/tests/terraformtests/README.md
+++ b/tests/terraformtests/README.md
@@ -2,23 +2,33 @@ Documentation on how to run Terraform Tests can be found here:
 
 http://docs.getmoto.org/en/latest/docs/contributing/development_tips/tests.html#terraform-tests
 
-To see a list of available tests:
+To get started you need to have [Go](https://go.dev/doc/install) installed.
+
+One time setup:
 
+```bash
+go mod init moto
 ```
+
+To see a list of available tests:
+
+```bash
 cd tests/terraformtests/terraform-provider-aws
+git submodule init
+git submodule update
 go test ./internal/service/elb/ -v -list TestAcc
 ```
 
 To run a specific test:
 
-```
+```bash
 moto_server -p 4566
 make terraformtests SERVICE_NAME=elb TEST_NAMES=NewTestName
 ```
 
 To see the list of tests that currently pass:
 
-```
+```bash
 python tests/terraformtests/get_tf_services.py
 python tests/terraformtests/get_tf_tests.py ec2
 ```
diff --git a/tests/test_awslambda/test_lambda.py b/tests/test_awslambda/test_lambda.py
index 0a52ebafc..93f716126 100644
--- a/tests/test_awslambda/test_lambda.py
+++ b/tests/test_awslambda/test_lambda.py
@@ -6,7 +6,7 @@ import boto3
 import hashlib
 import pytest
 
-from botocore.exceptions import ClientError
+from botocore.exceptions import ClientError, ParamValidationError
 from freezegun import freeze_time
 from tests.test_ecr.test_ecr_helpers import _create_image_manifest
 from moto import mock_lambda, mock_s3, mock_ecr, settings
@@ -172,6 +172,8 @@ def test_create_function_from_zipfile():
     result.pop("LastModified")
 
     assert result == {
+        "Architectures": ["x86_64"],
+        "EphemeralStorage": {"Size": 512},
         "FunctionName": function_name,
         "FunctionArn": f"arn:aws:lambda:{_lambda_region}:{ACCOUNT_ID}:function:{function_name}",
         "Runtime": "python2.7",
@@ -190,9 +192,122 @@ def test_create_function_from_zipfile():
         "State": "Active",
         "Layers": [],
         "TracingConfig": {"Mode": "PassThrough"},
+        "SnapStart": {"ApplyOn": "None", "OptimizationStatus": "Off"},
     }
 
 
+@mock_lambda
+def test_create_function_from_image():
+    conn = boto3.client("lambda", _lambda_region)
+    function_name = str(uuid4())[0:6]
+    image_uri = f"{ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/testlambdaecr:prod"
+    image_config = {
+        "EntryPoint": [
+            "python",
+        ],
+        "Command": [
+            "/opt/app.py",
+        ],
+        "WorkingDirectory": "/opt",
+    }
+    conn.create_function(
+        FunctionName=function_name,
+        Role=get_role_name(),
+        Code={"ImageUri": image_uri},
+        Description="test lambda function",
+        ImageConfig=image_config,
+        PackageType="Image",
+        Timeout=3,
+        MemorySize=128,
+        Publish=True,
+    )
+
+    result = conn.get_function(FunctionName=function_name)
+
+    assert "ImageConfigResponse" in result["Configuration"]
+    assert result["Configuration"]["ImageConfigResponse"]["ImageConfig"] == image_config
+
+
+@mock_lambda
+def test_create_function_error_bad_architecture():
+    conn = boto3.client("lambda", _lambda_region)
+    function_name = str(uuid4())[0:6]
+    image_uri = f"{ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/testlambdaecr:prod"
+
+    with pytest.raises(ClientError) as exc:
+        conn.create_function(
+            Architectures=["foo"],
+            FunctionName=function_name,
+            Role=get_role_name(),
+            Code={"ImageUri": image_uri},
+            Description="test lambda function",
+            Timeout=3,
+            MemorySize=128,
+            Publish=True,
+        )
+
+    err = exc.value.response
+
+    assert err["Error"]["Code"] == "ValidationException"
+    assert (
+        err["Error"]["Message"]
+        == "1 validation error detected: Value '['foo']' at 'architectures' failed to satisfy"
+        " constraint: Member must satisfy constraint: [Member must satisfy enum value set: "
+        "[x86_64, arm64], Member must not be null]"
+    )
+
+
+@mock_lambda
+def test_create_function_error_ephemeral_too_big():
+    conn = boto3.client("lambda", _lambda_region)
+    function_name = str(uuid4())[0:6]
+    image_uri = f"{ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/testlambdaecr:prod"
+
+    with pytest.raises(ClientError) as exc:
+        conn.create_function(
+            FunctionName=function_name,
+            Role=get_role_name(),
+            Code={"ImageUri": image_uri},
+            Description="test lambda function",
+            Timeout=3,
+            MemorySize=128,
+            Publish=True,
+            EphemeralStorage={"Size": 3000000},
+        )
+
+    err = exc.value.response
+
+    assert err["Error"]["Code"] == "ValidationException"
+    assert (
+        err["Error"]["Message"]
+        == "1 validation error detected: Value '3000000' at 'ephemeralStorage.size' "
+        "failed to satisfy constraint: "
+        "Member must have value less than or equal to 10240"
+    )
+
+
+@mock_lambda
+def test_create_function_error_ephemeral_too_small():
+    conn = boto3.client("lambda", _lambda_region)
+    function_name = str(uuid4())[0:6]
+    image_uri = f"{ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/testlambdaecr:prod"
+
+    with pytest.raises(ParamValidationError) as exc:
+        conn.create_function(
+            FunctionName=function_name,
+            Role=get_role_name(),
+            Code={"ImageUri": image_uri},
+            Description="test lambda function",
+            Timeout=3,
+            MemorySize=128,
+            Publish=True,
+            EphemeralStorage={"Size": 200},
+        )
+
+    # this one is handled by botocore, not moto
+    assert exc.typename == "ParamValidationError"
+
+
 @mock_lambda
 @pytest.mark.parametrize(
     "tracing_mode",
@@ -762,6 +877,7 @@ def test_list_create_list_get_delete_list():
         Handler="lambda_function.lambda_handler",
         Code={"S3Bucket": bucket_name, "S3Key": "test.zip"},
         Description="test lambda function",
+        EphemeralStorage={"Size": 2500},
         Timeout=3,
         MemorySize=128,
         Publish=True,
@@ -789,6 +905,9 @@ def test_list_create_list_get_delete_list():
             "Layers": [],
             "LastUpdateStatus": "Successful",
             "TracingConfig": {"Mode": "PassThrough"},
+            "Architectures": ["x86_64"],
+            "EphemeralStorage": {"Size": 2500},
+            "SnapStart": {"ApplyOn": "None", "OptimizationStatus": "Off"},
         },
         "ResponseMetadata": {"HTTPStatusCode": 200},
     }
diff --git a/tests/test_cloudfront/test_cloudfront.py b/tests/test_cloudfront/test_cloudfront.py
index 507cc9085..ab2784314 100644
--- a/tests/test_cloudfront/test_cloudfront.py
+++ b/tests/test_cloudfront/test_cloudfront.py
@@ -3,7 +3,6 @@ import pytest
 import boto3
 from botocore.exceptions import ClientError, ParamValidationError
 from moto import mock_cloudfront
-import sure  # noqa # pylint: disable=unused-import
 from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
 from . import cloudfront_test_scaffolding as scaffold
 
@@ -26,122 +25,100 @@ def test_update_distribution():
     dist_config["Origins"]["Items"][0]["OriginPath"] = "/updated"
     dist_config["Aliases"] = {"Quantity": len(aliases), "Items": aliases}
 
-    resp = client.update_distribution(
+    dist = client.update_distribution(
         DistributionConfig=dist_config, Id=dist_id, IfMatch=dist_etag
-    )
-
-    resp.should.have.key("Distribution")
-    distribution = resp["Distribution"]
-    distribution.should.have.key("Id")
-    distribution.should.have.key("ARN").equals(
-        f"arn:aws:cloudfront:{ACCOUNT_ID}:distribution/{distribution['Id']}"
-    )
-    distribution.should.have.key("Status").equals("Deployed")
-    distribution.should.have.key("LastModifiedTime")
-    distribution.should.have.key("InProgressInvalidationBatches").equals(0)
-    distribution.should.have.key("DomainName").should.contain(".cloudfront.net")
-
-    distribution.should.have.key("ActiveTrustedSigners")
-    signers = distribution["ActiveTrustedSigners"]
-    signers.should.have.key("Enabled").equals(False)
-    signers.should.have.key("Quantity").equals(0)
-
-    distribution.should.have.key("ActiveTrustedKeyGroups")
-    key_groups = distribution["ActiveTrustedKeyGroups"]
-    key_groups.should.have.key("Enabled").equals(False)
-    key_groups.should.have.key("Quantity").equals(0)
-
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
-    config.should.have.key("CallerReference").should.equal("ref")
-
-    config.should.have.key("Aliases")
-    config["Aliases"].should.equal(dist_config["Aliases"])
-
-    config.should.have.key("Origins")
+    )["Distribution"]
+    assert dist["ARN"] == f"arn:aws:cloudfront:{ACCOUNT_ID}:distribution/{dist['Id']}"
+    assert dist["Status"] == "Deployed"
+    assert "LastModifiedTime" in dist
+    assert dist["InProgressInvalidationBatches"] == 0
+    assert ".cloudfront.net" in dist["DomainName"]
+
+    assert dist["ActiveTrustedSigners"] == {
+        "Enabled": False,
+        "Items": [],
+        "Quantity": 0,
+    }
+
+    assert dist["ActiveTrustedKeyGroups"] == {
+        "Enabled": False,
+        "Items": [],
+        "Quantity": 0,
+    }
+
+    config = dist["DistributionConfig"]
+    assert config["CallerReference"] == "ref"
+
+    assert config["Aliases"] == dist_config["Aliases"]
+
     origins = config["Origins"]
-    origins.should.have.key("Quantity").equals(1)
-    origins.should.have.key("Items").length_of(1)
+    assert origins["Quantity"] == 1
+    assert len(origins["Items"]) == 1
     origin = origins["Items"][0]
-    origin.should.have.key("Id").equals("origin1")
-    origin.should.have.key("DomainName").equals("asdf.s3.us-east-1.amazonaws.com")
-    origin.should.have.key("OriginPath").equals("/updated")
+    assert origin["Id"] == "origin1"
+    assert origin["DomainName"] == "asdf.s3.us-east-1.amazonaws.com"
+    assert origin["OriginPath"] == "/updated"
 
-    origin.should.have.key("CustomHeaders")
-    origin["CustomHeaders"].should.have.key("Quantity").equals(0)
+    assert origin["CustomHeaders"]["Quantity"] == 0
 
-    origin.should.have.key("ConnectionAttempts").equals(3)
-    origin.should.have.key("ConnectionTimeout").equals(10)
-    origin.should.have.key("OriginShield").equals(
-        {"Enabled": False, "OriginShieldRegion": "None"}
-    )
+    assert origin["ConnectionAttempts"] == 3
+    assert origin["ConnectionTimeout"] == 10
+    assert origin["OriginShield"] == {"Enabled": False, "OriginShieldRegion": "None"}
 
-    config.should.have.key("OriginGroups").equals({"Quantity": 0})
+    assert config["OriginGroups"] == {"Quantity": 0}
 
-    config.should.have.key("DefaultCacheBehavior")
     default_cache = config["DefaultCacheBehavior"]
-    default_cache.should.have.key("TargetOriginId").should.equal("origin1")
-    default_cache.should.have.key("TrustedSigners")
+    assert default_cache["TargetOriginId"] == "origin1"
 
     signers = default_cache["TrustedSigners"]
-    signers.should.have.key("Enabled").equals(False)
-    signers.should.have.key("Quantity").equals(0)
+    assert signers["Enabled"] is False
+    assert signers["Quantity"] == 0
 
-    default_cache.should.have.key("TrustedKeyGroups")
     groups = default_cache["TrustedKeyGroups"]
-    groups.should.have.key("Enabled").equals(False)
-    groups.should.have.key("Quantity").equals(0)
+    assert groups["Enabled"] is False
+    assert groups["Quantity"] == 0
 
-    default_cache.should.have.key("ViewerProtocolPolicy").equals("allow-all")
+    assert default_cache["ViewerProtocolPolicy"] == "allow-all"
 
-    default_cache.should.have.key("AllowedMethods")
     methods = default_cache["AllowedMethods"]
-    methods.should.have.key("Quantity").equals(2)
-    methods.should.have.key("Items")
-    set(methods["Items"]).should.equal({"HEAD", "GET"})
+    assert methods["Quantity"] == 2
+    assert set(methods["Items"]) == {"HEAD", "GET"}
 
-    methods.should.have.key("CachedMethods")
     cached_methods = methods["CachedMethods"]
-    cached_methods.should.have.key("Quantity").equals(2)
-    set(cached_methods["Items"]).should.equal({"HEAD", "GET"})
-
-    default_cache.should.have.key("SmoothStreaming").equals(False)
-    default_cache.should.have.key("Compress").equals(True)
-    default_cache.should.have.key("LambdaFunctionAssociations").equals({"Quantity": 0})
-    default_cache.should.have.key("FunctionAssociations").equals({"Quantity": 0})
-    default_cache.should.have.key("FieldLevelEncryptionId").equals("")
-    default_cache.should.have.key("CachePolicyId")
-
-    config.should.have.key("CacheBehaviors").equals({"Quantity": 0})
-    config.should.have.key("CustomErrorResponses").equals({"Quantity": 0})
-    config.should.have.key("Comment").equals(
-        "an optional comment that's not actually optional"
-    )
-
-    config.should.have.key("Logging")
+    assert cached_methods["Quantity"] == 2
+    assert set(cached_methods["Items"]) == {"HEAD", "GET"}
+
+    assert default_cache["SmoothStreaming"] is False
+    assert default_cache["Compress"] is True
+    assert default_cache["LambdaFunctionAssociations"] == {"Quantity": 0}
+    assert default_cache["FunctionAssociations"] == {"Quantity": 0}
+    assert default_cache["FieldLevelEncryptionId"] == ""
+    assert "CachePolicyId" in default_cache
+
+    assert config["CacheBehaviors"] == {"Quantity": 0}
+    assert config["CustomErrorResponses"] == {"Quantity": 0}
+    assert config["Comment"] == "an optional comment that's not actually optional"
+
     logging = config["Logging"]
-    logging.should.have.key("Enabled").equals(False)
-    logging.should.have.key("IncludeCookies").equals(False)
-    logging.should.have.key("Bucket").equals("")
-    logging.should.have.key("Prefix").equals("")
-
-    config.should.have.key("PriceClass").equals("PriceClass_All")
-    config.should.have.key("Enabled").equals(False)
-    config.should.have.key("WebACLId")
-    config.should.have.key("HttpVersion").equals("http2")
-    config.should.have.key("IsIPV6Enabled").equals(True)
-
-    config.should.have.key("ViewerCertificate")
+    assert logging["Enabled"] is False
+    assert logging["IncludeCookies"] is False
+    assert logging["Bucket"] == ""
+    assert logging["Prefix"] == ""
+
+    assert config["PriceClass"] == "PriceClass_All"
+    assert config["Enabled"] is False
+    assert "WebACLId" in config
+    assert config["HttpVersion"] == "http2"
+    assert config["IsIPV6Enabled"] is True
+
     cert = config["ViewerCertificate"]
-    cert.should.have.key("CloudFrontDefaultCertificate").equals(True)
-    cert.should.have.key("MinimumProtocolVersion").equals("TLSv1")
-    cert.should.have.key("CertificateSource").equals("cloudfront")
+    assert cert["CloudFrontDefaultCertificate"] is True
+    assert cert["MinimumProtocolVersion"] == "TLSv1"
+    assert cert["CertificateSource"] == "cloudfront"
 
-    config.should.have.key("Restrictions")
-    config["Restrictions"].should.have.key("GeoRestriction")
     restriction = config["Restrictions"]["GeoRestriction"]
-    restriction.should.have.key("RestrictionType").equals("none")
-    restriction.should.have.key("Quantity").equals(0)
+    assert restriction["RestrictionType"] == "none"
+    assert restriction["Quantity"] == 0
 
 
 @mock_cloudfront
@@ -166,10 +143,10 @@ def test_update_distribution_no_such_distId():
         )
 
     metadata = error.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(404)
+    assert metadata["HTTPStatusCode"] == 404
     err = error.value.response["Error"]
-    err["Code"].should.equal("NoSuchDistribution")
-    err["Message"].should.equal("The specified distribution does not exist.")
+    assert err["Code"] == "NoSuchDistribution"
+    assert err["Message"] == "The specified distribution does not exist."
 
 
 @mock_cloudfront
@@ -194,9 +171,9 @@ def test_update_distribution_distId_is_None():
         )
 
     typename = error.typename
-    typename.should.equal("ParamValidationError")
+    assert typename == "ParamValidationError"
     error_str = "botocore.exceptions.ParamValidationError: Parameter validation failed:\nInvalid type for parameter Id, value: None, type: <class 'NoneType'>, valid types: <class 'str'>"
-    error.exconly().should.equal(error_str)
+    assert error.exconly() == error_str
 
 
 @mock_cloudfront
@@ -220,11 +197,11 @@ def test_update_distribution_IfMatch_not_set():
         )
 
     metadata = error.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(400)
+    assert metadata["HTTPStatusCode"] == 400
     err = error.value.response["Error"]
-    err["Code"].should.equal("InvalidIfMatchVersion")
+    assert err["Code"] == "InvalidIfMatchVersion"
     msg = "The If-Match version is missing or not valid for the resource."
-    err["Message"].should.equal(msg)
+    assert err["Message"] == msg
 
 
 @mock_cloudfront
@@ -243,6 +220,6 @@ def test_update_distribution_dist_config_not_set():
         client.update_distribution(Id=dist_id, IfMatch=dist_etag)
 
     typename = error.typename
-    typename.should.equal("ParamValidationError")
+    assert typename == "ParamValidationError"
     error_str = 'botocore.exceptions.ParamValidationError: Parameter validation failed:\nMissing required parameter in input: "DistributionConfig"'
-    error.exconly().should.equal(error_str)
+    assert error.exconly() == error_str
diff --git a/tests/test_cloudfront/test_cloudfront_dist_tags.py b/tests/test_cloudfront/test_cloudfront_dist_tags.py
index 75f3627a6..13e9e1e86 100644
--- a/tests/test_cloudfront/test_cloudfront_dist_tags.py
+++ b/tests/test_cloudfront/test_cloudfront_dist_tags.py
@@ -1,7 +1,6 @@
 import boto3
 from moto import mock_cloudfront
 from . import cloudfront_test_scaffolding as scaffold
-import sure  # noqa # pylint: disable=unused-import
 
 
 @mock_cloudfront
@@ -12,13 +11,11 @@ def test_create_distribution_with_tags():
     config = {"DistributionConfig": config, "Tags": tags}
 
     resp = client.create_distribution_with_tags(DistributionConfigWithTags=config)
-    resp.should.have.key("Distribution")
 
     resp = client.list_tags_for_resource(Resource=resp["Distribution"]["ARN"])
-    resp.should.have.key("Tags")
-    resp["Tags"].should.have.key("Items").length_of(2)
-    resp["Tags"]["Items"].should.contain({"Key": "k1", "Value": "v1"})
-    resp["Tags"]["Items"].should.contain({"Key": "k2", "Value": "v2"})
+    assert len(resp["Tags"]["Items"]) == 2
+    assert {"Key": "k1", "Value": "v1"} in resp["Tags"]["Items"]
+    assert {"Key": "k2", "Value": "v2"} in resp["Tags"]["Items"]
 
 
 @mock_cloudfront
@@ -29,9 +26,7 @@ def test_create_distribution_with_tags_only_one_tag():
     config = {"DistributionConfig": config, "Tags": tags}
 
     resp = client.create_distribution_with_tags(DistributionConfigWithTags=config)
-    resp.should.have.key("Distribution")
 
     resp = client.list_tags_for_resource(Resource=resp["Distribution"]["ARN"])
-    resp.should.have.key("Tags")
-    resp["Tags"].should.have.key("Items").length_of(1)
-    resp["Tags"]["Items"].should.contain({"Key": "k1", "Value": "v1"})
+    assert len(resp["Tags"]["Items"]) == 1
+    assert {"Key": "k1", "Value": "v1"} in resp["Tags"]["Items"]
diff --git a/tests/test_cloudfront/test_cloudfront_distributions.py b/tests/test_cloudfront/test_cloudfront_distributions.py
index 962839823..addda8cd2 100644
--- a/tests/test_cloudfront/test_cloudfront_distributions.py
+++ b/tests/test_cloudfront/test_cloudfront_distributions.py
@@ -4,7 +4,6 @@ from moto import mock_cloudfront
 from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
 from . import cloudfront_test_scaffolding as scaffold
 import pytest
-import sure  # noqa # pylint: disable=unused-import
 
 
 @mock_cloudfront
@@ -12,121 +11,110 @@ def test_create_distribution_s3_minimum():
     client = boto3.client("cloudfront", region_name="us-west-1")
     config = scaffold.example_distribution_config("ref")
 
-    resp = client.create_distribution(DistributionConfig=config)
-    resp.should.have.key("Distribution")
-
-    distribution = resp["Distribution"]
-    distribution.should.have.key("Id")
-    distribution.should.have.key("ARN").equals(
-        f"arn:aws:cloudfront:{ACCOUNT_ID}:distribution/{distribution['Id']}"
-    )
-    distribution.should.have.key("Status").equals("InProgress")
-    distribution.should.have.key("LastModifiedTime")
-    distribution.should.have.key("InProgressInvalidationBatches").equals(0)
-    distribution.should.have.key("DomainName").should.contain(".cloudfront.net")
-
-    distribution.should.have.key("ActiveTrustedSigners")
-    signers = distribution["ActiveTrustedSigners"]
-    signers.should.have.key("Enabled").equals(False)
-    signers.should.have.key("Quantity").equals(0)
+    dist = client.create_distribution(DistributionConfig=config)["Distribution"]
+    assert dist["ARN"] == f"arn:aws:cloudfront:{ACCOUNT_ID}:distribution/{dist['Id']}"
+    assert dist["Status"] == "InProgress"
+    assert "LastModifiedTime" in dist
+    assert dist["InProgressInvalidationBatches"] == 0
+    assert ".cloudfront.net" in dist["DomainName"]
+
+    assert dist["ActiveTrustedSigners"] == {
+        "Enabled": False,
+        "Items": [],
+        "Quantity": 0,
+    }
 
-    distribution.should.have.key("ActiveTrustedKeyGroups")
-    key_groups = distribution["ActiveTrustedKeyGroups"]
-    key_groups.should.have.key("Enabled").equals(False)
-    key_groups.should.have.key("Quantity").equals(0)
+    assert dist["ActiveTrustedKeyGroups"] == {
+        "Enabled": False,
+        "Items": [],
+        "Quantity": 0,
+    }
 
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
-    config.should.have.key("CallerReference").should.equal("ref")
+    config = dist["DistributionConfig"]
+    assert config["CallerReference"] == "ref"
 
-    config.should.have.key("Aliases")
-    config["Aliases"].should.have.key("Quantity").equals(0)
+    assert config["Aliases"]["Quantity"] == 0
 
-    config.should.have.key("Origins")
     origins = config["Origins"]
-    origins.should.have.key("Quantity").equals(1)
-    origins.should.have.key("Items").length_of(1)
+    assert origins["Quantity"] == 1
+    assert len(origins["Items"]) == 1
     origin = origins["Items"][0]
-    origin.should.have.key("Id").equals("origin1")
-    origin.should.have.key("DomainName").equals("asdf.s3.us-east-1.amazonaws.com")
-    origin.should.have.key("OriginPath").equals("/example")
+    assert origin["Id"] == "origin1"
+    assert origin["DomainName"] == "asdf.s3.us-east-1.amazonaws.com"
+    assert origin["OriginPath"] == "/example"
 
-    origin.should.have.key("CustomHeaders")
-    origin["CustomHeaders"].should.have.key("Quantity").equals(0)
+    assert origin["CustomHeaders"]["Quantity"] == 0
 
-    origin.should.have.key("ConnectionAttempts").equals(3)
-    origin.should.have.key("ConnectionTimeout").equals(10)
-    origin.should.have.key("OriginShield").equals({"Enabled": False})
+    assert origin["ConnectionAttempts"] == 3
+    assert origin["ConnectionTimeout"] == 10
+    assert origin["OriginShield"] == {"Enabled": False}
 
-    config.should.have.key("OriginGroups").equals({"Quantity": 0})
+    assert config["OriginGroups"] == {"Quantity": 0}
 
-    config.should.have.key("DefaultCacheBehavior")
     default_cache = config["DefaultCacheBehavior"]
-    default_cache.should.have.key("TargetOriginId").should.equal("origin1")
-    default_cache.should.have.key("TrustedSigners")
+    assert default_cache["TargetOriginId"] == "origin1"
 
-    signers = default_cache["TrustedSigners"]
-    signers.should.have.key("Enabled").equals(False)
-    signers.should.have.key("Quantity").equals(0)
+    assert default_cache["TrustedSigners"] == {
+        "Enabled": False,
+        "Items": [],
+        "Quantity": 0,
+    }
 
-    default_cache.should.have.key("TrustedKeyGroups")
-    groups = default_cache["TrustedKeyGroups"]
-    groups.should.have.key("Enabled").equals(False)
-    groups.should.have.key("Quantity").equals(0)
+    assert default_cache["TrustedKeyGroups"] == {
+        "Enabled": False,
+        "Items": [],
+        "Quantity": 0,
+    }
 
-    default_cache.should.have.key("ViewerProtocolPolicy").equals("allow-all")
+    assert default_cache["ViewerProtocolPolicy"] == "allow-all"
 
-    default_cache.should.have.key("AllowedMethods")
     methods = default_cache["AllowedMethods"]
-    methods.should.have.key("Quantity").equals(2)
-    methods.should.have.key("Items")
-    set(methods["Items"]).should.equal({"HEAD", "GET"})
+    assert methods["Quantity"] == 2
+    assert set(methods["Items"]) == {"HEAD", "GET"}
 
-    methods.should.have.key("CachedMethods")
     cached_methods = methods["CachedMethods"]
-    cached_methods.should.have.key("Quantity").equals(2)
-    set(cached_methods["Items"]).should.equal({"HEAD", "GET"})
-
-    default_cache.should.have.key("SmoothStreaming").equals(False)
-    default_cache.should.have.key("Compress").equals(True)
-    default_cache.should.have.key("LambdaFunctionAssociations").equals({"Quantity": 0})
-    default_cache.should.have.key("FunctionAssociations").equals({"Quantity": 0})
-    default_cache.should.have.key("FieldLevelEncryptionId").equals("")
-    default_cache.should.have.key("CachePolicyId")
-
-    config.should.have.key("CacheBehaviors").equals({"Quantity": 0})
-    config.should.have.key("CustomErrorResponses").equals({"Quantity": 0})
-    config.should.have.key("Comment").equals(
-        "an optional comment that's not actually optional"
-    )
+    assert cached_methods["Quantity"] == 2
+    assert set(cached_methods["Items"]) == {"HEAD", "GET"}
+
+    assert default_cache["SmoothStreaming"] is False
+    assert default_cache["Compress"] is True
+    assert default_cache["LambdaFunctionAssociations"] == {"Quantity": 0}
+    assert default_cache["FunctionAssociations"] == {"Quantity": 0}
+    assert default_cache["FieldLevelEncryptionId"] == ""
+    assert "CachePolicyId" in default_cache
+
+    assert config["CacheBehaviors"] == {"Quantity": 0}
+    assert config["CustomErrorResponses"] == {"Quantity": 0}
+    assert config["Comment"] == "an optional comment that's not actually optional"
+
+    assert config["Logging"] == {
+        "Bucket": "",
+        "Enabled": False,
+        "IncludeCookies": False,
+        "Prefix": "",
+    }
 
-    config.should.have.key("Logging")
-    logging = config["Logging"]
-    logging.should.have.key("Enabled").equals(False)
-    logging.should.have.key("IncludeCookies").equals(False)
-    logging.should.have.key("Bucket").equals("")
-    logging.should.have.key("Prefix").equals("")
-
-    config.should.have.key("PriceClass").equals("PriceClass_All")
-    config.should.have.key("Enabled").equals(False)
-    config.should.have.key("WebACLId")
-    config.should.have.key("HttpVersion").equals("http2")
-    config.should.have.key("IsIPV6Enabled").equals(True)
-
-    config.should.have.key("ViewerCertificate")
-    cert = config["ViewerCertificate"]
-    cert.should.have.key("CloudFrontDefaultCertificate").equals(True)
-    cert.should.have.key("MinimumProtocolVersion").equals("TLSv1")
-    cert.should.have.key("CertificateSource").equals("cloudfront")
+    assert config["PriceClass"] == "PriceClass_All"
+    assert config["Enabled"] is False
+    assert "WebACLId" in config
+    assert config["HttpVersion"] == "http2"
+    assert config["IsIPV6Enabled"] is True
+
+    assert config["ViewerCertificate"] == {
+        "ACMCertificateArn": "",
+        "Certificate": "",
+        "CertificateSource": "cloudfront",
+        "CloudFrontDefaultCertificate": True,
+        "IAMCertificateId": "",
+        "MinimumProtocolVersion": "TLSv1",
+        "SSLSupportMethod": "",
+    }
 
-    config.should.have.key("Restrictions")
-    config["Restrictions"].should.have.key("GeoRestriction")
     restriction = config["Restrictions"]["GeoRestriction"]
-    restriction.should.have.key("RestrictionType").equals("none")
-    restriction.should.have.key("Quantity").equals(0)
+    assert restriction["RestrictionType"] == "none"
+    assert restriction["Quantity"] == 0
 
-    config.should.have.key("WebACLId")
-    config.should.have.key("WebACLId").equals("")
+    assert config["WebACLId"] == ""
 
 
 @mock_cloudfront
@@ -141,19 +129,14 @@ def test_create_distribution_with_logging():
     }
 
     resp = client.create_distribution(DistributionConfig=config)
-    resp.should.have.key("Distribution")
-
-    distribution = resp["Distribution"]
+    config = resp["Distribution"]["DistributionConfig"]
 
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
-
-    config.should.have.key("Logging")
-    logging = config["Logging"]
-    logging.should.have.key("Enabled").equals(True)
-    logging.should.have.key("IncludeCookies").equals(True)
-    logging.should.have.key("Bucket").equals("logging-bucket")
-    logging.should.have.key("Prefix").equals("logging-bucket")
+    assert config["Logging"] == {
+        "Bucket": "logging-bucket",
+        "Enabled": True,
+        "IncludeCookies": True,
+        "Prefix": "logging-bucket",
+    }
 
 
 @mock_cloudfront
@@ -163,15 +146,9 @@ def test_create_distribution_with_web_acl():
     config["WebACLId"] = "test-web-acl"
 
     resp = client.create_distribution(DistributionConfig=config)
-    resp.should.have.key("Distribution")
+    config = resp["Distribution"]["DistributionConfig"]
 
-    distribution = resp["Distribution"]
-
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
-
-    config.should.have.key("WebACLId")
-    config.should.have.key("WebACLId").equals("test-web-acl")
+    assert config["WebACLId"] == "test-web-acl"
 
 
 @mock_cloudfront
@@ -183,23 +160,12 @@ def test_create_distribution_with_field_level_encryption_and_real_time_log_confi
     config["DefaultCacheBehavior"]["FieldLevelEncryptionId"] = "K3D5EWEUDCCXON"
 
     resp = client.create_distribution(DistributionConfig=config)
-    resp.should.have.key("Distribution")
-
-    distribution = resp["Distribution"]
 
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
-
-    config.should.have.key("DefaultCacheBehavior")
+    config = resp["Distribution"]["DistributionConfig"]
     default_cache = config["DefaultCacheBehavior"]
 
-    default_cache.should.have.key("FieldLevelEncryptionId")
-    default_cache.should.have.key("FieldLevelEncryptionId").equals("K3D5EWEUDCCXON")
-
-    default_cache.should.have.key("RealtimeLogConfigArn")
-    default_cache.should.have.key("RealtimeLogConfigArn").equals(
-        real_time_log_config_arn
-    )
+    assert default_cache["FieldLevelEncryptionId"] == "K3D5EWEUDCCXON"
+    assert default_cache["RealtimeLogConfigArn"] == real_time_log_config_arn
 
 
 @mock_cloudfront
@@ -215,20 +181,13 @@ def test_create_distribution_with_georestriction():
     }
 
     resp = client.create_distribution(DistributionConfig=config)
-    resp.should.have.key("Distribution")
-
-    distribution = resp["Distribution"]
+    config = resp["Distribution"]["DistributionConfig"]
 
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
-
-    config.should.have.key("Restrictions")
-    config["Restrictions"].should.have.key("GeoRestriction")
     restriction = config["Restrictions"]["GeoRestriction"]
-    restriction.should.have.key("RestrictionType").equals("whitelist")
-    restriction.should.have.key("Quantity").equals(2)
-    restriction["Items"].should.contain("US")
-    restriction["Items"].should.contain("GB")
+    assert restriction["RestrictionType"] == "whitelist"
+    assert restriction["Quantity"] == 2
+    assert "US" in restriction["Items"]
+    assert "GB" in restriction["Items"]
 
 
 @mock_cloudfront
@@ -246,19 +205,16 @@ def test_create_distribution_with_allowed_methods():
 
     dist = client.create_distribution(DistributionConfig=config)["Distribution"]
 
-    dist.should.have.key("DistributionConfig")
     cache = dist["DistributionConfig"]["DefaultCacheBehavior"]
 
-    cache.should.have.key("AllowedMethods").equals(
-        {
-            "CachedMethods": {
-                "Items": ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
-                "Quantity": 7,
-            },
-            "Items": ["GET", "HEAD", "PUT"],
-            "Quantity": 3,
-        }
-    )
+    assert cache["AllowedMethods"] == {
+        "CachedMethods": {
+            "Items": ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
+            "Quantity": 7,
+        },
+        "Items": ["GET", "HEAD", "PUT"],
+        "Quantity": 3,
+    }
 
 
 @mock_cloudfront
@@ -275,11 +231,9 @@ def test_create_distribution_with_origins():
     dist = client.create_distribution(DistributionConfig=config)["Distribution"]
 
     origin = dist["DistributionConfig"]["Origins"]["Items"][0]
-    origin.should.have.key("ConnectionAttempts").equals(1)
-    origin.should.have.key("ConnectionTimeout").equals(2)
-    origin.should.have.key("OriginShield").equals(
-        {"Enabled": True, "OriginShieldRegion": "east"}
-    )
+    assert origin["ConnectionAttempts"] == 1
+    assert origin["ConnectionTimeout"] == 2
+    assert origin["OriginShield"] == {"Enabled": True, "OriginShieldRegion": "east"}
 
 
 @mock_cloudfront
@@ -305,26 +259,23 @@ def test_create_distribution_with_additional_fields(
     config["DefaultCacheBehavior"]["MinTTL"] = 10
     config["DefaultCacheBehavior"]["SmoothStreaming"] = smooth
     config["PriceClass"] = "PriceClass_100"
+
     resp = client.create_distribution(DistributionConfig=config)
-    distribution = resp["Distribution"]
-    distribution.should.have.key("DistributionConfig")
-    config = distribution["DistributionConfig"]
+    config = resp["Distribution"]["DistributionConfig"]
+
     assert config["Aliases"] == {"Items": aliases, "Quantity": len(aliases)}
 
-    config.should.have.key("PriceClass").equals("PriceClass_100")
-    config.should.have.key("IsIPV6Enabled").equals(ipv6)
+    assert config["PriceClass"] == "PriceClass_100"
+    assert config["IsIPV6Enabled"] == ipv6
 
-    config["DefaultCacheBehavior"].should.have.key("Compress").equals(compress)
-    config["DefaultCacheBehavior"].should.have.key("MinTTL").equals(10)
-    config["DefaultCacheBehavior"].should.have.key("SmoothStreaming").equals(smooth)
+    assert config["DefaultCacheBehavior"]["Compress"] == compress
+    assert config["DefaultCacheBehavior"]["MinTTL"] == 10
+    assert config["DefaultCacheBehavior"]["SmoothStreaming"] == smooth
 
     forwarded = config["DefaultCacheBehavior"]["ForwardedValues"]
-    forwarded.should.have.key("QueryString").equals(qs)
-    forwarded["Cookies"].should.have.key("Forward").equals("whitelist")
-    forwarded["Cookies"].should.have.key("WhitelistedNames")
-    forwarded["Cookies"]["WhitelistedNames"].should.have.key("Items").equals(
-        ["x-amz-header"]
-    )
+    assert forwarded["QueryString"] == qs
+    assert forwarded["Cookies"]["Forward"] == "whitelist"
+    assert forwarded["Cookies"]["WhitelistedNames"]["Items"] == ["x-amz-header"]
 
 
 @mock_cloudfront
@@ -336,9 +287,10 @@ def test_create_distribution_returns_etag():
     dist_id = resp["Distribution"]["Id"]
 
     headers = resp["ResponseMetadata"]["HTTPHeaders"]
-    headers.should.have.key("etag").length_of(13)
-    headers.should.have.key("location").equals(
-        f"https://cloudfront.amazonaws.com/2020-05-31/distribution/{dist_id}"
+    assert len(headers["etag"]) == 13
+    assert (
+        headers["location"]
+        == f"https://cloudfront.amazonaws.com/2020-05-31/distribution/{dist_id}"
     )
 
 
@@ -355,19 +307,20 @@ def test_create_distribution_needs_unique_caller_reference():
     with pytest.raises(ClientError) as exc:
         client.create_distribution(DistributionConfig=config)
     err = exc.value.response["Error"]
-    err["Code"].should.equal("DistributionAlreadyExists")
-    err["Message"].should.equal(
-        f"The caller reference that you are using to create a distribution is associated with another distribution. Already exists: {dist1_id}"
+    assert err["Code"] == "DistributionAlreadyExists"
+    assert (
+        err["Message"]
+        == f"The caller reference that you are using to create a distribution is associated with another distribution. Already exists: {dist1_id}"
     )
 
     # Creating another distribution with a different reference
     config = scaffold.example_distribution_config(ref="ref2")
     dist2 = client.create_distribution(DistributionConfig=config)
-    dist1_id.shouldnt.equal(dist2["Distribution"]["Id"])
+    assert dist1_id != dist2["Distribution"]["Id"]
 
     resp = client.list_distributions()["DistributionList"]
-    resp.should.have.key("Quantity").equals(2)
-    resp.should.have.key("Items").length_of(2)
+    assert resp["Quantity"] == 2
+    assert len(resp["Items"]) == 2
 
 
 @mock_cloudfront
@@ -378,10 +331,10 @@ def test_get_distribution_config_with_unknown_distribution_id():
         client.get_distribution_config(Id="unknown")
 
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(404)
+    assert metadata["HTTPStatusCode"] == 404
     err = exc.value.response["Error"]
-    err["Code"].should.equal("NoSuchDistribution")
-    err["Message"].should.equal("The specified distribution does not exist.")
+    assert err["Code"] == "NoSuchDistribution"
+    assert err["Message"] == "The specified distribution does not exist."
 
 
 @mock_cloudfront
@@ -405,11 +358,11 @@ def test_get_distribution_config_with_mismatched_originid():
             }
         )
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(404)
+    assert metadata["HTTPStatusCode"] == 404
     err = exc.value.response["Error"]
-    err["Code"].should.equal("NoSuchOrigin")
-    err["Message"].should.equal(
-        "One or more of your origins or origin groups do not exist."
+    assert err["Code"] == "NoSuchOrigin"
+    assert (
+        err["Message"] == "One or more of your origins or origin groups do not exist."
     )
 
 
@@ -435,11 +388,11 @@ def test_create_origin_without_origin_config():
         )
 
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(400)
+    assert metadata["HTTPStatusCode"] == 400
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidOrigin")
-    err["Message"].should.equal(
-        "The specified origin server does not exist or is not valid."
+    assert err["Code"] == "InvalidOrigin"
+    assert (
+        err["Message"] == "The specified origin server does not exist or is not valid."
     )
 
 
@@ -471,11 +424,12 @@ def test_create_distribution_with_invalid_s3_bucket():
         )
 
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(400)
+    assert metadata["HTTPStatusCode"] == 400
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidArgument")
-    err["Message"].should.equal(
-        "The parameter Origin DomainName does not refer to a valid S3 bucket."
+    assert err["Code"] == "InvalidArgument"
+    assert (
+        err["Message"]
+        == "The parameter Origin DomainName does not refer to a valid S3 bucket."
     )
 
 
@@ -487,33 +441,28 @@ def test_create_distribution_custom_config():
     dist = client.create_distribution(DistributionConfig=config)["Distribution"][
         "DistributionConfig"
     ]
-    dist.should.have.key("Origins")
-    dist["Origins"].should.have.key("Items").length_of(1)
-    origin = dist["Origins"]["Items"][0]
-
-    origin.should.have.key("CustomOriginConfig")
-    custom_config = origin["CustomOriginConfig"]
-
-    custom_config.should.have.key("HTTPPort").equals(80)
-    custom_config.should.have.key("HTTPSPort").equals(443)
-    custom_config.should.have.key("OriginProtocolPolicy").equals("http-only")
-    custom_config.should.have.key("OriginSslProtocols").equals(
-        {"Items": ["TLSv1", "SSLv3"], "Quantity": 2}
-    )
+    assert len(dist["Origins"]["Items"]) == 1
+    custom_config = dist["Origins"]["Items"][0]["CustomOriginConfig"]
+
+    assert custom_config["HTTPPort"] == 80
+    assert custom_config["HTTPSPort"] == 443
+    assert custom_config["OriginProtocolPolicy"] == "http-only"
+    assert custom_config["OriginSslProtocols"] == {
+        "Items": ["TLSv1", "SSLv3"],
+        "Quantity": 2,
+    }
 
 
 @mock_cloudfront
 def test_list_distributions_without_any():
     client = boto3.client("cloudfront", region_name="us-east-1")
 
-    resp = client.list_distributions()
-    resp.should.have.key("DistributionList")
-    dlist = resp["DistributionList"]
-    dlist.should.have.key("Marker").equals("")
-    dlist.should.have.key("MaxItems").equals(100)
-    dlist.should.have.key("IsTruncated").equals(False)
-    dlist.should.have.key("Quantity").equals(0)
-    dlist.shouldnt.have.key("Items")
+    dlist = client.list_distributions()["DistributionList"]
+    assert dlist["Marker"] == ""
+    assert dlist["MaxItems"] == 100
+    assert dlist["IsTruncated"] is False
+    assert dlist["Quantity"] == 0
+    assert "Items" not in dlist
 
 
 @mock_cloudfront
@@ -525,21 +474,19 @@ def test_list_distributions():
     config = scaffold.example_distribution_config(ref="ref2")
     dist2 = client.create_distribution(DistributionConfig=config)["Distribution"]
 
-    resp = client.list_distributions()
-    resp.should.have.key("DistributionList")
-    dlist = resp["DistributionList"]
-    dlist.should.have.key("Quantity").equals(2)
-    dlist.should.have.key("Items").length_of(2)
+    dlist = client.list_distributions()["DistributionList"]
+    assert dlist["Quantity"] == 2
+    assert len(dlist["Items"]) == 2
 
     item1 = dlist["Items"][0]
-    item1.should.have.key("Id").equals(dist1["Id"])
-    item1.should.have.key("ARN")
-    item1.should.have.key("Status").equals("Deployed")
+    assert item1["Id"] == dist1["Id"]
+    assert "ARN" in item1
+    assert item1["Status"] == "Deployed"
 
     item2 = dlist["Items"][1]
-    item2.should.have.key("Id").equals(dist2["Id"])
-    item2.should.have.key("ARN")
-    item2.should.have.key("Status").equals("Deployed")
+    assert item2["Id"] == dist2["Id"]
+    assert "ARN" in item2
+    assert item2["Status"] == "Deployed"
 
 
 @mock_cloudfront
@@ -554,15 +501,14 @@ def test_get_distribution():
     resp = client.get_distribution(Id=dist_id)
 
     headers = resp["ResponseMetadata"]["HTTPHeaders"]
-    headers.should.have.key("etag").length_of(13)
+    assert len(headers["etag"]) == 13
     dist = resp["Distribution"]
-    dist.should.have.key("Id").equals(dist_id)
-    dist.should.have.key("Status").equals("Deployed")
-    dist.should.have.key("DomainName").equals(dist["DomainName"])
+    assert dist["Id"] == dist_id
+    assert dist["Status"] == "Deployed"
+    assert dist["DomainName"] == dist["DomainName"]
 
-    dist.should.have.key("DistributionConfig")
     config = dist["DistributionConfig"]
-    config.should.have.key("CallerReference").should.equal("ref")
+    assert config["CallerReference"] == "ref"
 
 
 @mock_cloudfront
@@ -574,10 +520,10 @@ def test_get_unknown_distribution():
         client.get_distribution(Id="unknown")
 
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(404)
+    assert metadata["HTTPStatusCode"] == 404
     err = exc.value.response["Error"]
-    err["Code"].should.equal("NoSuchDistribution")
-    err["Message"].should.equal("The specified distribution does not exist.")
+    assert err["Code"] == "NoSuchDistribution"
+    assert err["Message"] == "The specified distribution does not exist."
 
 
 @mock_cloudfront
@@ -588,10 +534,10 @@ def test_delete_unknown_distribution():
         client.delete_distribution(Id="unknown", IfMatch="..")
 
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(404)
+    assert metadata["HTTPStatusCode"] == 404
     err = exc.value.response["Error"]
-    err["Code"].should.equal("NoSuchDistribution")
-    err["Message"].should.equal("The specified distribution does not exist.")
+    assert err["Code"] == "NoSuchDistribution"
+    assert err["Message"] == "The specified distribution does not exist."
 
 
 @mock_cloudfront
@@ -603,11 +549,12 @@ def test_delete_distribution_without_ifmatch():
         client.delete_distribution(Id="...")
 
     metadata = exc.value.response["ResponseMetadata"]
-    metadata["HTTPStatusCode"].should.equal(400)
+    assert metadata["HTTPStatusCode"] == 400
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidIfMatchVersion")
-    err["Message"].should.equal(
-        "The If-Match version is missing or not valid for the resource."
+    assert err["Code"] == "InvalidIfMatchVersion"
+    assert (
+        err["Message"]
+        == "The If-Match version is missing or not valid for the resource."
     )
 
 
@@ -629,7 +576,7 @@ def test_delete_distribution_random_etag():
     with pytest.raises(ClientError) as exc:
         client.get_distribution(Id=dist_id)
     err = exc.value.response["Error"]
-    err["Code"].should.equal("NoSuchDistribution")
+    assert err["Code"] == "NoSuchDistribution"
 
 
 @mock_cloudfront
@@ -641,97 +588,79 @@ def test_get_distribution_config():
     dist = client.create_distribution(DistributionConfig=config)
     dist_id = dist["Distribution"]["Id"]
 
-    resp = client.get_distribution_config(Id=dist_id)
-    resp.should.have.key("DistributionConfig")
-
-    config = resp["DistributionConfig"]
-    config.should.have.key("CallerReference").should.equal("ref")
+    config = client.get_distribution_config(Id=dist_id)["DistributionConfig"]
+    assert config["CallerReference"] == "ref"
 
-    config.should.have.key("Aliases")
-    config["Aliases"].should.have.key("Quantity").equals(0)
+    assert config["Aliases"]["Quantity"] == 0
 
-    config.should.have.key("Origins")
     origins = config["Origins"]
-    origins.should.have.key("Quantity").equals(1)
-    origins.should.have.key("Items").length_of(1)
+    assert origins["Quantity"] == 1
+    assert len(origins["Items"]) == 1
     origin = origins["Items"][0]
-    origin.should.have.key("Id").equals("origin1")
-    origin.should.have.key("DomainName").equals("asdf.s3.us-east-1.amazonaws.com")
-    origin.should.have.key("OriginPath").equals("/example")
+    assert origin["Id"] == "origin1"
+    assert origin["DomainName"] == "asdf.s3.us-east-1.amazonaws.com"
+    assert origin["OriginPath"] == "/example"
 
-    origin.should.have.key("CustomHeaders")
-    origin["CustomHeaders"].should.have.key("Quantity").equals(0)
+    assert origin["CustomHeaders"]["Quantity"] == 0
 
-    origin.should.have.key("ConnectionAttempts").equals(3)
-    origin.should.have.key("ConnectionTimeout").equals(10)
-    origin.should.have.key("OriginShield").equals({"Enabled": False})
+    assert origin["ConnectionAttempts"] == 3
+    assert origin["ConnectionTimeout"] == 10
+    assert origin["OriginShield"] == {"Enabled": False}
 
-    config.should.have.key("OriginGroups").equals({"Quantity": 0})
+    assert config["OriginGroups"] == {"Quantity": 0}
 
-    config.should.have.key("DefaultCacheBehavior")
     default_cache = config["DefaultCacheBehavior"]
-    default_cache.should.have.key("TargetOriginId").should.equal("origin1")
-    default_cache.should.have.key("TrustedSigners")
+    assert default_cache["TargetOriginId"] == "origin1"
 
     signers = default_cache["TrustedSigners"]
-    signers.should.have.key("Enabled").equals(False)
-    signers.should.have.key("Quantity").equals(0)
+    assert signers["Enabled"] is False
+    assert signers["Quantity"] == 0
 
-    default_cache.should.have.key("TrustedKeyGroups")
     groups = default_cache["TrustedKeyGroups"]
-    groups.should.have.key("Enabled").equals(False)
-    groups.should.have.key("Quantity").equals(0)
+    assert groups["Enabled"] is False
+    assert groups["Quantity"] == 0
 
-    default_cache.should.have.key("ViewerProtocolPolicy").equals("allow-all")
+    assert default_cache["ViewerProtocolPolicy"] == "allow-all"
 
-    default_cache.should.have.key("AllowedMethods")
     methods = default_cache["AllowedMethods"]
-    methods.should.have.key("Quantity").equals(2)
-    methods.should.have.key("Items")
-    set(methods["Items"]).should.equal({"HEAD", "GET"})
+    assert methods["Quantity"] == 2
+    assert set(methods["Items"]) == {"HEAD", "GET"}
 
-    methods.should.have.key("CachedMethods")
     cached_methods = methods["CachedMethods"]
-    cached_methods.should.have.key("Quantity").equals(2)
-    set(cached_methods["Items"]).should.equal({"HEAD", "GET"})
-
-    default_cache.should.have.key("SmoothStreaming").equals(False)
-    default_cache.should.have.key("Compress").equals(True)
-    default_cache.should.have.key("LambdaFunctionAssociations").equals({"Quantity": 0})
-    default_cache.should.have.key("FunctionAssociations").equals({"Quantity": 0})
-    default_cache.should.have.key("FieldLevelEncryptionId").equals("")
-    default_cache.should.have.key("CachePolicyId")
-
-    config.should.have.key("CacheBehaviors").equals({"Quantity": 0})
-    config.should.have.key("CustomErrorResponses").equals({"Quantity": 0})
-    config.should.have.key("Comment").equals(
-        "an optional comment that's not actually optional"
-    )
+    assert cached_methods["Quantity"] == 2
+    assert set(cached_methods["Items"]) == {"HEAD", "GET"}
+
+    assert default_cache["SmoothStreaming"] is False
+    assert default_cache["Compress"] is True
+    assert default_cache["LambdaFunctionAssociations"] == {"Quantity": 0}
+    assert default_cache["FunctionAssociations"] == {"Quantity": 0}
+    assert default_cache["FieldLevelEncryptionId"] == ""
+    assert "CachePolicyId" in default_cache
+
+    assert config["CacheBehaviors"] == {"Quantity": 0}
+    assert config["CustomErrorResponses"] == {"Quantity": 0}
+    assert config["Comment"] == "an optional comment that's not actually optional"
 
-    config.should.have.key("Logging")
     logging = config["Logging"]
-    logging.should.have.key("Enabled").equals(False)
-    logging.should.have.key("IncludeCookies").equals(False)
-    logging.should.have.key("Bucket").equals("")
-    logging.should.have.key("Prefix").equals("")
-
-    config.should.have.key("PriceClass").equals("PriceClass_All")
-    config.should.have.key("Enabled").equals(False)
-    config.should.have.key("WebACLId")
-    config.should.have.key("HttpVersion").equals("http2")
-    config.should.have.key("IsIPV6Enabled").equals(True)
-
-    config.should.have.key("ViewerCertificate")
+    assert logging["Enabled"] is False
+    assert logging["IncludeCookies"] is False
+    assert logging["Bucket"] == ""
+    assert logging["Prefix"] == ""
+
+    assert config["PriceClass"] == "PriceClass_All"
+    assert config["Enabled"] is False
+    assert "WebACLId" in config
+    assert config["HttpVersion"] == "http2"
+    assert config["IsIPV6Enabled"] is True
+
     cert = config["ViewerCertificate"]
-    cert.should.have.key("CloudFrontDefaultCertificate").equals(True)
-    cert.should.have.key("MinimumProtocolVersion").equals("TLSv1")
-    cert.should.have.key("CertificateSource").equals("cloudfront")
+    assert cert["CloudFrontDefaultCertificate"] is True
+    assert cert["MinimumProtocolVersion"] == "TLSv1"
+    assert cert["CertificateSource"] == "cloudfront"
 
-    config.should.have.key("Restrictions")
-    config["Restrictions"].should.have.key("GeoRestriction")
-    restriction = config["Restrictions"]["GeoRestriction"]
-    restriction.should.have.key("RestrictionType").equals("none")
-    restriction.should.have.key("Quantity").equals(0)
+    assert config["Restrictions"]["GeoRestriction"] == {
+        "RestrictionType": "none",
+        "Quantity": 0,
+    }
 
-    config.should.have.key("WebACLId")
-    config.should.have.key("WebACLId").equals("")
+    assert config["WebACLId"] == ""
diff --git a/tests/test_cloudfront/test_cloudfront_invalidation.py b/tests/test_cloudfront/test_cloudfront_invalidation.py
index 3604d71e9..7dd85f53c 100644
--- a/tests/test_cloudfront/test_cloudfront_invalidation.py
+++ b/tests/test_cloudfront/test_cloudfront_invalidation.py
@@ -1,7 +1,6 @@
 import boto3
 from moto import mock_cloudfront
 from . import cloudfront_test_scaffolding as scaffold
-import sure  # noqa # pylint: disable=unused-import
 
 
 @mock_cloudfront
@@ -19,18 +18,16 @@ def test_create_invalidation_with_single_path():
         },
     )
 
-    resp.should.have.key("Location")
-    resp.should.have.key("Invalidation")
+    assert "Location" in resp
+    assert "Invalidation" in resp
 
-    resp["Invalidation"].should.have.key("Id")
-    resp["Invalidation"].should.have.key("Status").equals("COMPLETED")
-    resp["Invalidation"].should.have.key("CreateTime")
-    resp["Invalidation"].should.have.key("InvalidationBatch").equals(
-        {
-            "Paths": {"Quantity": 1, "Items": ["/path1"]},
-            "CallerReference": "ref2",
-        }
-    )
+    assert "Id" in resp["Invalidation"]
+    assert resp["Invalidation"]["Status"] == "COMPLETED"
+    assert "CreateTime" in resp["Invalidation"]
+    assert resp["Invalidation"]["InvalidationBatch"] == {
+        "Paths": {"Quantity": 1, "Items": ["/path1"]},
+        "CallerReference": "ref2",
+    }
 
 
 @mock_cloudfront
@@ -48,18 +45,16 @@ def test_create_invalidation_with_multiple_paths():
         },
     )
 
-    resp.should.have.key("Location")
-    resp.should.have.key("Invalidation")
+    assert "Location" in resp
+    assert "Invalidation" in resp
 
-    resp["Invalidation"].should.have.key("Id")
-    resp["Invalidation"].should.have.key("Status").equals("COMPLETED")
-    resp["Invalidation"].should.have.key("CreateTime")
-    resp["Invalidation"].should.have.key("InvalidationBatch").equals(
-        {
-            "Paths": {"Quantity": 2, "Items": ["/path1", "/path2"]},
-            "CallerReference": "ref2",
-        }
-    )
+    assert "Id" in resp["Invalidation"]
+    assert resp["Invalidation"]["Status"] == "COMPLETED"
+    assert "CreateTime" in resp["Invalidation"]
+    assert resp["Invalidation"]["InvalidationBatch"] == {
+        "Paths": {"Quantity": 2, "Items": ["/path1", "/path2"]},
+        "CallerReference": "ref2",
+    }
 
 
 @mock_cloudfront
@@ -77,32 +72,26 @@ def test_list_invalidations():
     )
     invalidation_id = resp["Invalidation"]["Id"]
 
-    resp = client.list_invalidations(
-        DistributionId=dist_id,
-    )
+    resp = client.list_invalidations(DistributionId=dist_id)
 
-    resp.should.have.key("InvalidationList")
-    resp["InvalidationList"].shouldnt.have.key("NextMarker")
-    resp["InvalidationList"].should.have.key("MaxItems").equal(100)
-    resp["InvalidationList"].should.have.key("IsTruncated").equal(False)
-    resp["InvalidationList"].should.have.key("Quantity").equal(1)
-    resp["InvalidationList"].should.have.key("Items").length_of(1)
-    resp["InvalidationList"]["Items"][0].should.have.key("Id").equal(invalidation_id)
-    resp["InvalidationList"]["Items"][0].should.have.key("CreateTime")
-    resp["InvalidationList"]["Items"][0].should.have.key("Status").equal("COMPLETED")
+    assert "NextMarker" not in resp["InvalidationList"]
+    assert resp["InvalidationList"]["MaxItems"] == 100
+    assert resp["InvalidationList"]["IsTruncated"] is False
+    assert resp["InvalidationList"]["Quantity"] == 1
+    assert len(resp["InvalidationList"]["Items"]) == 1
+    assert resp["InvalidationList"]["Items"][0]["Id"] == invalidation_id
+    assert "CreateTime" in resp["InvalidationList"]["Items"][0]
+    assert resp["InvalidationList"]["Items"][0]["Status"] == "COMPLETED"
 
 
 @mock_cloudfront
 def test_list_invalidations__no_entries():
     client = boto3.client("cloudfront", region_name="us-west-1")
 
-    resp = client.list_invalidations(
-        DistributionId="SPAM",
-    )
+    resp = client.list_invalidations(DistributionId="SPAM")
 
-    resp.should.have.key("InvalidationList")
-    resp["InvalidationList"].shouldnt.have.key("NextMarker")
-    resp["InvalidationList"].should.have.key("MaxItems").equal(100)
-    resp["InvalidationList"].should.have.key("IsTruncated").equal(False)
-    resp["InvalidationList"].should.have.key("Quantity").equal(0)
-    resp["InvalidationList"].shouldnt.have.key("Items")
+    assert "NextMarker" not in resp["InvalidationList"]
+    assert resp["InvalidationList"]["MaxItems"] == 100
+    assert resp["InvalidationList"]["IsTruncated"] is False
+    assert resp["InvalidationList"]["Quantity"] == 0
+    assert "Items" not in resp["InvalidationList"]
diff --git a/tests/test_cloudtrail/test_cloudtrail.py b/tests/test_cloudtrail/test_cloudtrail.py
index 3db451e0e..4c98dfdb8 100644
--- a/tests/test_cloudtrail/test_cloudtrail.py
+++ b/tests/test_cloudtrail/test_cloudtrail.py
@@ -1,7 +1,6 @@
 """Unit tests for cloudtrail-supported APIs."""
 import boto3
 import pytest
-import sure  # noqa # pylint: disable=unused-import
 
 from botocore.exceptions import ClientError
 from datetime import datetime
@@ -19,9 +18,10 @@ def test_create_trail_without_bucket():
             Name="mytrailname", S3BucketName="specificweirdbucketthatdoesnotexist"
         )
     err = exc.value.response["Error"]
-    err["Code"].should.equal("S3BucketDoesNotExistException")
-    err["Message"].should.equal(
-        "S3 bucket specificweirdbucketthatdoesnotexist does not exist!"
+    assert err["Code"] == "S3BucketDoesNotExistException"
+    assert (
+        err["Message"]
+        == "S3 bucket specificweirdbucketthatdoesnotexist does not exist!"
     )
 
 
@@ -56,26 +56,27 @@ def test_create_trail_invalid_name(name, message):
             Name=name, S3BucketName="specificweirdbucketthatdoesnotexist"
         )
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidTrailNameException")
-    err["Message"].should.equal(message)
+    assert err["Code"] == "InvalidTrailNameException"
+    assert err["Message"] == message
 
 
 @mock_cloudtrail
 @mock_s3
 def test_create_trail_simple():
     bucket_name, resp, trail_name = create_trail_simple()
-    resp.should.have.key("Name").equal(trail_name)
-    resp.should.have.key("S3BucketName").equal(bucket_name)
-    resp.shouldnt.have.key("S3KeyPrefix")
-    resp.shouldnt.have.key("SnsTopicName")
-    resp.shouldnt.have.key("SnsTopicARN")
-    resp.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    resp.should.have.key("IsMultiRegionTrail").equal(False)
-    resp.should.have.key("TrailARN").equal(
-        f"arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/{trail_name}"
+    assert resp["Name"] == trail_name
+    assert resp["S3BucketName"] == bucket_name
+    assert "S3KeyPrefix" not in resp
+    assert "SnsTopicName" not in resp
+    assert "SnsTopicARN" not in resp
+    assert resp["IncludeGlobalServiceEvents"] is True
+    assert resp["IsMultiRegionTrail"] is False
+    assert (
+        resp["TrailARN"]
+        == f"arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/{trail_name}"
     )
-    resp.should.have.key("LogFileValidationEnabled").equal(False)
-    resp.should.have.key("IsOrganizationTrail").equal(False)
+    assert resp["LogFileValidationEnabled"] is False
+    assert resp["IsOrganizationTrail"] is False
 
 
 def create_trail_simple(region_name="us-east-1"):
@@ -99,11 +100,9 @@ def test_create_trail_multi_but_not_global():
             IsMultiRegionTrail=True,
         )
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidParameterCombinationException")
+    assert err["Code"] == "InvalidParameterCombinationException"
     # Note that this validation occurs before the S3 bucket is validated
-    err["Message"].should.equal(
-        "Multi-Region trail must include global service events."
-    )
+    assert err["Message"] == "Multi-Region trail must include global service events."
 
 
 @mock_cloudtrail
@@ -121,9 +120,9 @@ def test_create_trail_with_nonexisting_topic():
             SnsTopicName="nonexistingtopic",
         )
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InsufficientSnsTopicPolicyException")
-    err["Message"].should.equal(
-        "SNS Topic does not exist or the topic policy is incorrect!"
+    assert err["Code"] == "InsufficientSnsTopicPolicyException"
+    assert (
+        err["Message"] == "SNS Topic does not exist or the topic policy is incorrect!"
     )
 
 
@@ -132,23 +131,22 @@ def test_create_trail_with_nonexisting_topic():
 @mock_sns
 def test_create_trail_advanced():
     bucket_name, resp, sns_topic_name, trail_name = create_trail_advanced()
-    resp.should.have.key("Name").equal(trail_name)
-    resp.should.have.key("S3BucketName").equal(bucket_name)
-    resp.should.have.key("S3KeyPrefix").equal("s3kp")
-    resp.should.have.key("SnsTopicName").equal(sns_topic_name)
-    resp.should.have.key("SnsTopicARN").equal(
-        f"arn:aws:sns:us-east-1:{ACCOUNT_ID}:{sns_topic_name}"
-    )
-    resp.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    resp.should.have.key("IsMultiRegionTrail").equal(True)
-    resp.should.have.key("TrailARN").equal(
-        f"arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/{trail_name}"
+    assert resp["Name"] == trail_name
+    assert resp["S3BucketName"] == bucket_name
+    assert resp["S3KeyPrefix"] == "s3kp"
+    assert resp["SnsTopicName"] == sns_topic_name
+    assert resp["SnsTopicARN"] == f"arn:aws:sns:us-east-1:{ACCOUNT_ID}:{sns_topic_name}"
+    assert resp["IncludeGlobalServiceEvents"] is True
+    assert resp["IsMultiRegionTrail"] is True
+    assert (
+        resp["TrailARN"]
+        == f"arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/{trail_name}"
     )
-    resp.should.have.key("LogFileValidationEnabled").equal(True)
-    resp.should.have.key("IsOrganizationTrail").equal(True)
-    resp.should.have.key("CloudWatchLogsLogGroupArn").equals("cwllga")
-    resp.should.have.key("CloudWatchLogsRoleArn").equals("cwlra")
-    resp.should.have.key("KmsKeyId").equals("kki")
+    assert resp["LogFileValidationEnabled"] is True
+    assert resp["IsOrganizationTrail"] is True
+    assert resp["CloudWatchLogsLogGroupArn"] == "cwllga"
+    assert resp["CloudWatchLogsRoleArn"] == "cwlra"
+    assert resp["KmsKeyId"] == "kki"
 
 
 def create_trail_advanced(region_name="us-east-1"):
@@ -183,9 +181,10 @@ def test_get_trail_with_one_char():
     with pytest.raises(ClientError) as exc:
         client.get_trail(Name="?")
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidTrailNameException")
-    err["Message"].should.equal(
-        "Trail name too short. Minimum allowed length: 3 characters. Specified name length: 1 characters."
+    assert err["Code"] == "InvalidTrailNameException"
+    assert (
+        err["Message"]
+        == "Trail name too short. Minimum allowed length: 3 characters. Specified name length: 1 characters."
     )
 
 
@@ -195,10 +194,8 @@ def test_get_trail_unknown():
     with pytest.raises(ClientError) as exc:
         client.get_trail(Name="unknowntrail")
     err = exc.value.response["Error"]
-    err["Code"].should.equal("TrailNotFoundException")
-    err["Message"].should.equal(
-        f"Unknown trail: unknowntrail for the user: {ACCOUNT_ID}"
-    )
+    assert err["Code"] == "TrailNotFoundException"
+    assert err["Message"] == f"Unknown trail: unknowntrail for the user: {ACCOUNT_ID}"
 
 
 @mock_cloudtrail
@@ -208,11 +205,11 @@ def test_get_trail():
     client = boto3.client("cloudtrail", region_name="us-east-1")
     _, _, name = create_trail_simple()
     trail = client.get_trail(Name=name)["Trail"]
-    trail.should.have.key("Name").equal(name)
-    trail.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    trail.should.have.key("IsMultiRegionTrail").equal(False)
-    trail.should.have.key("TrailARN").equal(
-        f"arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/{name}"
+    assert trail["Name"] == name
+    assert trail["IncludeGlobalServiceEvents"] is True
+    assert trail["IsMultiRegionTrail"] is False
+    assert (
+        trail["TrailARN"] == f"arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/{name}"
     )
 
 
@@ -222,9 +219,10 @@ def test_get_trail_status_with_one_char():
     with pytest.raises(ClientError) as exc:
         client.get_trail_status(Name="?")
     err = exc.value.response["Error"]
-    err["Code"].should.equal("InvalidTrailNameException")
-    err["Message"].should.equal(
-        "Trail name too short. Minimum allowed length: 3 characters. Specified name length: 1 characters."
+    assert err["Code"] == "InvalidTrailNameException"
+    assert (
+        err["Message"]
+        == "Trail name too short. Minimum allowed length: 3 characters. Specified name length: 1 characters."
     )
 
 
@@ -234,9 +232,10 @@ def test_get_trail_status_unknown_trail():
     with pytest.raises(ClientError) as exc:
         client.get_trail_status(Name="unknowntrail")
     err = exc.value.response["Error"]
-    err["Code"].should.equal("TrailNotFoundException")
-    err["Message"].should.equal(
-        f"Unknown trail: arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/unknowntrail for the user: {ACCOUNT_ID}"
+    assert err["Code"] == "TrailNotFoundException"
+    assert (
+        err["Message"]
+        == f"Unknown trail: arn:aws:cloudtrail:us-east-1:{ACCOUNT_ID}:trail/unknowntrail for the user: {ACCOUNT_ID}"
     )
 
 
@@ -246,14 +245,14 @@ def test_get_trail_status_inactive():
     client = boto3.client("cloudtrail", region_name="us-east-1")
     _, _, trail_name = create_trail_simple()
     status = client.get_trail_status(Name=trail_name)
-    status.should.have.key("IsLogging").equal(False)
-    status.should.have.key("LatestDeliveryAttemptTime").equal("")
-    status.should.have.key("LatestNotificationAttemptTime").equal("")
-    status.should.have.key("LatestNotificationAttemptSucceeded").equal("")
-    status.should.have.key("LatestDeliveryAttemptSucceeded").equal("")
-    status.should.have.key("TimeLoggingStarted").equal("")
-    status.should.have.key("TimeLoggingStopped").equal("")
-    status.shouldnt.have.key("StartLoggingTime")
+    assert status["IsLogging"] is False
+    assert status["LatestDeliveryAttemptTime"] == ""
+    assert status["LatestNotificationAttemptTime"] == ""
+    assert status["LatestNotificationAttemptSucceeded"] == ""
+    assert status["LatestDeliveryAttemptSucceeded"] == ""
+    assert status["TimeLoggingStarted"] == ""
+    assert status["TimeLoggingStopped"] == ""
+    assert "StartLoggingTime" not in status
 
 
 @mock_cloudtrail
@@ -262,14 +261,14 @@ def test_get_trail_status_arn_inactive():
     client = boto3.client("cloudtrail", region_name="us-east-1")
     _, resp, _ = create_trail_simple()
     status = client.get_trail_status(Name=resp["TrailARN"])
-    status.should.have.key("IsLogging").equal(False)
-    status.should.have.key("LatestDeliveryAttemptTime").equal("")
-    status.should.have.key("LatestNotificationAttemptTime").equal("")
-    status.should.have.key("LatestNotificationAttemptSucceeded").equal("")
-    status.should.have.key("LatestDeliveryAttemptSucceeded").equal("")
-    status.should.have.key("TimeLoggingStarted").equal("")
-    status.should.have.key("TimeLoggingStopped").equal("")
-    status.shouldnt.have.key("StartLoggingTime")
+    assert status["IsLogging"] is False
+    assert status["LatestDeliveryAttemptTime"] == ""
+    assert status["LatestNotificationAttemptTime"] == ""
+    assert status["LatestNotificationAttemptSucceeded"] == ""
+    assert status["LatestDeliveryAttemptSucceeded"] == ""
+    assert status["TimeLoggingStarted"] == ""
+    assert status["TimeLoggingStopped"] == ""
+    assert "StartLoggingTime" not in status
 
 
 @mock_cloudtrail
@@ -281,20 +280,18 @@ def test_get_trail_status_after_starting():
     client.start_logging(Name=trail_name)
 
     status = client.get_trail_status(Name=trail_name)
-    status.should.have.key("IsLogging").equal(True)
-    status.should.have.key("LatestDeliveryTime").be.a(datetime)
-    status.should.have.key("StartLoggingTime").be.a(datetime)
-    status.should.have.key(
-        "LatestDeliveryAttemptTime"
-    )  # .equal("2021-10-13T15:36:53Z")
-    status.should.have.key("LatestNotificationAttemptTime").equal("")
-    status.should.have.key("LatestNotificationAttemptSucceeded").equal("")
-    status.should.have.key(
-        "LatestDeliveryAttemptSucceeded"
-    )  # .equal("2021-10-13T15:36:53Z")
-    status.should.have.key("TimeLoggingStarted")  # .equal("2021-10-13T15:02:21Z")
-    status.should.have.key("TimeLoggingStopped").equal("")
-    status.shouldnt.have.key("StopLoggingTime")
+    assert status["IsLogging"] is True
+    assert isinstance(status["LatestDeliveryTime"], datetime)
+    assert isinstance(status["StartLoggingTime"], datetime)
+    # .equal("2021-10-13T15:36:53Z")
+    assert "LatestDeliveryAttemptTime" in status
+    assert status["LatestNotificationAttemptTime"] == ""
+    assert status["LatestNotificationAttemptSucceeded"] == ""
+    # .equal("2021-10-13T15:36:53Z")
+    assert "LatestDeliveryAttemptSucceeded" in status
+    assert "TimeLoggingStarted" in status  # .equal("2021-10-13T15:02:21Z")
+    assert status["TimeLoggingStopped"] == ""
+    assert "StopLoggingTime" not in status
 
 
 @mock_cloudtrail
@@ -308,20 +305,18 @@ def test_get_trail_status_after_starting_and_stopping():
     client.stop_logging(Name=trail_name)
 
     status = client.get_trail_status(Name=trail_name)
-    status.should.have.key("IsLogging").equal(False)
-    status.should.have.key("LatestDeliveryTime").be.a(datetime)
-    status.should.have.key("StartLoggingTime").be.a(datetime)
-    status.should.have.key("StopLoggingTime").be.a(datetime)
-    status.should.have.key(
-        "LatestDeliveryAttemptTime"
-    )  # .equal("2021-10-13T15:36:53Z")
-    status.should.have.key("LatestNotificationAttemptTime").equal("")
-    status.should.have.key("LatestNotificationAttemptSucceeded").equal("")
-    status.should.have.key(
-        "LatestDeliveryAttemptSucceeded"
-    )  # .equal("2021-10-13T15:36:53Z")
-    status.should.have.key("TimeLoggingStarted")  # .equal("2021-10-13T15:02:21Z")
-    status.should.have.key("TimeLoggingStopped")  # .equal("2021-10-13T15:03:21Z")
+    assert status["IsLogging"] is False
+    assert isinstance(status["LatestDeliveryTime"], datetime)
+    assert isinstance(status["StartLoggingTime"], datetime)
+    assert isinstance(status["StopLoggingTime"], datetime)
+    # .equal("2021-10-13T15:36:53Z")
+    assert "LatestDeliveryAttemptTime" in status
+    assert status["LatestNotificationAttemptTime"] == ""
+    assert status["LatestNotificationAttemptSucceeded"] == ""
+    # .equal("2021-10-13T15:36:53Z")
+    assert "LatestDeliveryAttemptSucceeded" in status
+    assert "TimeLoggingStarted" in status  # .equal("2021-10-13T15:02:21Z")
+    assert "TimeLoggingStopped" in status  # .equal("2021-10-13T15:03:21Z")
 
 
 @mock_cloudtrail
@@ -335,16 +330,15 @@ def test_list_trails_different_home_region_one_multiregion():
     create_trail_simple(region_name="eu-west-1")
 
     all_trails = client.list_trails()["Trails"]
-    all_trails.should.have.length_of(1)
 
     # Only the Trail created in the ap-southeast-2 is MultiRegion
-    all_trails.should.contain(
+    assert all_trails == [
         {
             "TrailARN": trail2["TrailARN"],
             "Name": trail2["Name"],
             "HomeRegion": "ap-southeast-2",
         }
-    )
+    ]
 
 
 @mock_cloudtrail
@@ -360,7 +354,7 @@ def test_list_trails_different_home_region_no_multiregion():
     all_trails = client.list_trails()["Trails"]
     # Since there is no MultiRegion Trail created
     # the eu-west-3 has no Trails
-    all_trails.should.have.length_of(0)
+    assert len(all_trails) == 0
 
 
 @mock_cloudtrail
@@ -375,35 +369,35 @@ def test_describe_trails_without_shadowtrails():
     # There are two Trails created in the us-east-1
     # one MultiRegion and the other is not MultiRegion
     trails = client.describe_trails()["trailList"]
-    trails.should.have.length_of(2)
+    assert len(trails) == 2
 
     first_trail = [t for t in trails if t["Name"] == trail1["Name"]][0]
-    first_trail.should.have.key("Name").equal(trail1["Name"])
-    first_trail.should.have.key("S3BucketName").equal(trail1["S3BucketName"])
-    first_trail.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    first_trail.should.have.key("IsMultiRegionTrail").equal(False)
-    first_trail.should.have.key("HomeRegion").equal("us-east-1")
-    first_trail.should.have.key("LogFileValidationEnabled").equal(False)
-    first_trail.should.have.key("HasCustomEventSelectors").equal(False)
-    first_trail.should.have.key("HasInsightSelectors").equal(False)
-    first_trail.should.have.key("IsOrganizationTrail").equal(False)
-    first_trail.shouldnt.have.key("S3KeyPrefix")
-    first_trail.shouldnt.have.key("SnsTopicName")
-    first_trail.shouldnt.have.key("SnsTopicARN")
+    assert first_trail["Name"] == trail1["Name"]
+    assert first_trail["S3BucketName"] == trail1["S3BucketName"]
+    assert first_trail["IncludeGlobalServiceEvents"] is True
+    assert first_trail["IsMultiRegionTrail"] is False
+    assert first_trail["HomeRegion"] == "us-east-1"
+    assert first_trail["LogFileValidationEnabled"] is False
+    assert first_trail["HasCustomEventSelectors"] is False
+    assert first_trail["HasInsightSelectors"] is False
+    assert first_trail["IsOrganizationTrail"] is False
+    assert "S3KeyPrefix" not in first_trail
+    assert "SnsTopicName" not in first_trail
+    assert "SnsTopicARN" not in first_trail
 
     second_trail = [t for t in trails if t["Name"] == trail2["Name"]][0]
-    second_trail.should.have.key("Name").equal(trail2["Name"])
-    second_trail.should.have.key("S3BucketName").equal(trail2["S3BucketName"])
-    second_trail.should.have.key("S3KeyPrefix").equal(trail2["S3KeyPrefix"])
-    second_trail.should.have.key("SnsTopicName").equal(trail2["SnsTopicName"])
-    second_trail.should.have.key("SnsTopicARN").equal(trail2["SnsTopicARN"])
-    second_trail.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    second_trail.should.have.key("IsMultiRegionTrail").equal(True)
-    second_trail.should.have.key("HomeRegion").equal("us-east-1")
-    second_trail.should.have.key("LogFileValidationEnabled").equal(True)
-    second_trail.should.have.key("HasCustomEventSelectors").equal(False)
-    second_trail.should.have.key("HasInsightSelectors").equal(False)
-    second_trail.should.have.key("IsOrganizationTrail").equal(True)
+    assert second_trail["Name"] == trail2["Name"]
+    assert second_trail["S3BucketName"] == trail2["S3BucketName"]
+    assert second_trail["S3KeyPrefix"] == trail2["S3KeyPrefix"]
+    assert second_trail["SnsTopicName"] == trail2["SnsTopicName"]
+    assert second_trail["SnsTopicARN"] == trail2["SnsTopicARN"]
+    assert second_trail["IncludeGlobalServiceEvents"] is True
+    assert second_trail["IsMultiRegionTrail"] is True
+    assert second_trail["HomeRegion"] == "us-east-1"
+    assert second_trail["LogFileValidationEnabled"] is True
+    assert second_trail["HasCustomEventSelectors"] is False
+    assert second_trail["HasInsightSelectors"] is False
+    assert second_trail["IsOrganizationTrail"] is True
 
 
 @mock_cloudtrail
@@ -419,14 +413,14 @@ def test_describe_trails_with_shadowtrails_true():
     # There are two Trails created in the us-east-1
     # one MultiRegion and the other is not MultiRegion
     trails = client.describe_trails(includeShadowTrails=True)["trailList"]
-    trails.should.have.length_of(2)
+    assert len(trails) == 2
 
     # There are two Trails in the eu-west-1
     # one MultiRegion (created in the us-east-1)
     # and another not MultiRegion created in the us-east-1
     eu_client = boto3.client("cloudtrail", region_name="eu-west-1")
     trails = eu_client.describe_trails(includeShadowTrails=True)["trailList"]
-    trails.should.have.length_of(2)
+    assert len(trails) == 2
 
 
 @mock_cloudtrail
@@ -440,13 +434,13 @@ def test_describe_trails_with_shadowtrails_false():
     _, _, name3 = create_trail_simple(region_name="eu-west-1")
 
     trails = client.describe_trails(includeShadowTrails=False)["trailList"]
-    trails.should.have.length_of(2)
-    [t["Name"] for t in trails].should.equal([name1, name2])
+    assert len(trails) == 2
+    assert [t["Name"] for t in trails] == [name1, name2]
 
     eu_client = boto3.client("cloudtrail", region_name="eu-west-1")
     trails = eu_client.describe_trails(includeShadowTrails=False)["trailList"]
-    trails.should.have.length_of(1)
-    [t["Name"] for t in trails].should.equal([name3])
+    assert len(trails) == 1
+    assert [t["Name"] for t in trails] == [name3]
 
 
 @mock_cloudtrail
@@ -456,12 +450,12 @@ def test_delete_trail():
     _, _, name = create_trail_simple()
 
     trails = client.describe_trails()["trailList"]
-    trails.should.have.length_of(1)
+    assert len(trails) == 1
 
     client.delete_trail(Name=name)
 
     trails = client.describe_trails()["trailList"]
-    trails.should.have.length_of(0)
+    assert len(trails) == 0
 
 
 @mock_cloudtrail
@@ -470,26 +464,26 @@ def test_update_trail_simple():
     client = boto3.client("cloudtrail", region_name="ap-southeast-2")
     bucket_name, trail, name = create_trail_simple(region_name="ap-southeast-2")
     resp = client.update_trail(Name=name)
-    resp.should.have.key("Name").equal(name)
-    resp.should.have.key("S3BucketName").equal(bucket_name)
-    resp.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    resp.should.have.key("IsMultiRegionTrail").equal(False)
-    resp.should.have.key("LogFileValidationEnabled").equal(False)
-    resp.should.have.key("IsOrganizationTrail").equal(False)
-    resp.shouldnt.have.key("S3KeyPrefix")
-    resp.shouldnt.have.key("SnsTopicName")
-    resp.shouldnt.have.key("SnsTopicARN")
+    assert resp["Name"] == name
+    assert resp["S3BucketName"] == bucket_name
+    assert resp["IncludeGlobalServiceEvents"] is True
+    assert resp["IsMultiRegionTrail"] is False
+    assert resp["LogFileValidationEnabled"] is False
+    assert resp["IsOrganizationTrail"] is False
+    assert "S3KeyPrefix" not in resp
+    assert "SnsTopicName" not in resp
+    assert "SnsTopicARN" not in resp
 
     trail = client.get_trail(Name=name)["Trail"]
-    trail.should.have.key("Name").equal(name)
-    trail.should.have.key("S3BucketName").equal(bucket_name)
-    trail.should.have.key("IncludeGlobalServiceEvents").equal(True)
-    trail.should.have.key("IsMultiRegionTrail").equal(False)
-    trail.should.have.key("LogFileValidationEnabled").equal(False)
-    trail.should.have.key("IsOrganizationTrail").equal(False)
-    trail.shouldnt.have.key("S3KeyPrefix")
-    trail.shouldnt.have.key("SnsTopicName")
-    trail.shouldnt.have.key("SnsTopicARN")
+    assert trail["Name"] == name
+    assert trail["S3BucketName"] == bucket_name
+    assert trail["IncludeGlobalServiceEvents"] is True
+    assert trail["IsMultiRegionTrail"] is False
+    assert trail["LogFileValidationEnabled"] is False
+    assert trail["IsOrganizationTrail"] is False
+    assert "S3KeyPrefix" not in trail
+    assert "SnsTopicName" not in trail
+    assert "SnsTopicARN" not in trail
 
 
 @mock_cloudtrail
@@ -510,24 +504,24 @@ def test_update_trail_full():
         KmsKeyId="kki",
         IsOrganizationTrail=True,
     )
-    resp.should.have.key("Name").equal(name)
-    resp.should.have.key("S3BucketName").equal("updated_bucket")
-    resp.should.have.key("S3KeyPrefix").equals("s3kp")
-    resp.should.have.key("SnsTopicName").equals("stn")
-    resp.should.have.key("IncludeGlobalServiceEvents").equal(False)
-    resp.should.have.key("IsMultiRegionTrail").equal(True)
-    resp.should.have.key("LogFileValidationEnabled").equal(True)
-    resp.should.have.key("IsOrganizationTrail").equal(True)
+    assert resp["Name"] == name
+    assert resp["S3BucketName"] == "updated_bucket"
+    assert resp["S3KeyPrefix"] == "s3kp"
+    assert resp["SnsTopicName"] == "stn"
+    assert resp["IncludeGlobalServiceEvents"] is False
+    assert resp["IsMultiRegionTrail"] is True
+    assert resp["LogFileValidationEnabled"] is True
+    assert resp["IsOrganizationTrail"] is True
 
     trail = client.get_trail(Name=name)["Trail"]
-    trail.should.have.key("Name").equal(name)
-    trail.should.have.key("S3BucketName").equal("updated_bucket")
-    trail.should.have.key("S3KeyPrefix").equals("s3kp")
-    trail.should.have.key("SnsTopicName").equals("stn")
-    trail.should.have.key("IncludeGlobalServiceEvents").equal(False)
-    trail.should.have.key("IsMultiRegionTrail").equal(True)
-    trail.should.have.key("LogFileValidationEnabled").equal(True)
-    trail.should.have.key("IsOrganizationTrail").equal(True)
-    trail.should.have.key("CloudWatchLogsLogGroupArn").equals("cwllga")
-    trail.should.have.key("CloudWatchLogsRoleArn").equals("cwlra")
-    trail.should.have.key("KmsKeyId").equals("kki")
+    assert trail["Name"] == name
+    assert trail["S3BucketName"] == "updated_bucket"
+    assert trail["S3KeyPrefix"] == "s3kp"
+    assert trail["SnsTopicName"] == "stn"
+    assert trail["IncludeGlobalServiceEvents"] is False
+    assert trail["IsMultiRegionTrail"] is True
+    assert trail["LogFileValidationEnabled"] is True
+    assert trail["IsOrganizationTrail"] is True
+    assert trail["CloudWatchLogsLogGroupArn"] == "cwllga"
+    assert trail["CloudWatchLogsRoleArn"] == "cwlra"
+    assert trail["KmsKeyId"] == "kki"
diff --git a/tests/test_cloudtrail/test_cloudtrail_eventselectors.py b/tests/test_cloudtrail/test_cloudtrail_eventselectors.py
index 0e9cfe088..ce1a55487 100644
--- a/tests/test_cloudtrail/test_cloudtrail_eventselectors.py
+++ b/tests/test_cloudtrail/test_cloudtrail_eventselectors.py
@@ -26,19 +26,17 @@ def test_put_event_selectors():
         ],
     )
 
-    resp.should.have.key("TrailARN")
-    resp.should.have.key("EventSelectors").equals(
-        [
-            {
-                "ReadWriteType": "All",
-                "IncludeManagementEvents": True,
-                "DataResources": [
-                    {"Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::*/*"]}
-                ],
-            }
-        ]
-    )
-    resp.shouldnt.have.key("AdvancedEventSelectors")
+    assert "TrailARN" in resp
+    assert resp["EventSelectors"] == [
+        {
+            "ReadWriteType": "All",
+            "IncludeManagementEvents": True,
+            "DataResources": [
+                {"Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::*/*"]}
+            ],
+        }
+    ]
+    assert "AdvancedEventSelectors" not in resp
 
 
 @mock_cloudtrail
@@ -63,21 +61,19 @@ def test_put_event_selectors_advanced():
         ],
     )
 
-    resp.should.have.key("TrailARN")
-    resp.should.have.key("EventSelectors").equals(
-        [
-            {
-                "ReadWriteType": "All",
-                "IncludeManagementEvents": True,
-                "DataResources": [
-                    {"Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::*/*"]}
-                ],
-            }
-        ]
-    )
-    resp.should.have.key("AdvancedEventSelectors").equals(
-        [{"Name": "aes1", "FieldSelectors": [{"Field": "f", "Equals": ["fs1"]}]}]
-    )
+    assert "TrailARN" in resp
+    assert resp["EventSelectors"] == [
+        {
+            "ReadWriteType": "All",
+            "IncludeManagementEvents": True,
+            "DataResources": [
+                {"Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::*/*"]}
+            ],
+        }
+    ]
+    assert resp["AdvancedEventSelectors"] == [
+        {"Name": "aes1", "FieldSelectors": [{"Field": "f", "Equals": ["fs1"]}]}
+    ]
 
 
 @mock_cloudtrail
@@ -88,11 +84,12 @@ def test_get_event_selectors_empty():
 
     resp = client.get_event_selectors(TrailName=trail_name)
 
-    resp.should.have.key("TrailARN").equals(
-        f"arn:aws:cloudtrail:ap-southeast-1:{ACCOUNT_ID}:trail/{trail_name}"
+    assert (
+        resp["TrailARN"]
+        == f"arn:aws:cloudtrail:ap-southeast-1:{ACCOUNT_ID}:trail/{trail_name}"
     )
-    resp.should.have.key("EventSelectors").equals([])
-    resp.should.have.key("AdvancedEventSelectors").equals([])
+    assert resp["EventSelectors"] == []
+    assert resp["AdvancedEventSelectors"] == []
 
 
 @mock_cloudtrail
@@ -116,20 +113,19 @@ def test_get_event_selectors():
 
     resp = client.get_event_selectors(TrailName=trail_name)
 
-    resp.should.have.key("TrailARN").equals(
-        f"arn:aws:cloudtrail:ap-southeast-2:{ACCOUNT_ID}:trail/{trail_name}"
-    )
-    resp.should.have.key("EventSelectors").equals(
-        [
-            {
-                "ReadWriteType": "All",
-                "IncludeManagementEvents": False,
-                "DataResources": [
-                    {"Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::*/*"]}
-                ],
-            }
-        ]
+    assert (
+        resp["TrailARN"]
+        == f"arn:aws:cloudtrail:ap-southeast-2:{ACCOUNT_ID}:trail/{trail_name}"
     )
+    assert resp["EventSelectors"] == [
+        {
+            "ReadWriteType": "All",
+            "IncludeManagementEvents": False,
+            "DataResources": [
+                {"Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::*/*"]}
+            ],
+        }
+    ]
 
 
 @mock_cloudtrail
@@ -160,13 +156,12 @@ def test_get_event_selectors_multiple():
 
     resp = client.get_event_selectors(TrailName=trail_name)
 
-    resp.should.have.key("TrailARN")
+    assert "TrailARN" in resp
     # Setting advanced selectors cancels any existing event selectors
-    resp.should.have.key("EventSelectors").equals([])
-    resp.should.have.key("AdvancedEventSelectors").length_of(1)
-    resp.should.have.key("AdvancedEventSelectors").equals(
-        [{"Name": "aes1", "FieldSelectors": [{"Field": "f", "Equals": ["fs1"]}]}]
-    )
+    assert resp["EventSelectors"] == []
+    assert resp["AdvancedEventSelectors"] == [
+        {"Name": "aes1", "FieldSelectors": [{"Field": "f", "Equals": ["fs1"]}]}
+    ]
 
 
 @mock_cloudtrail
@@ -180,10 +175,8 @@ def test_put_insight_selectors(using_arn):
         TrailName=trail_name, InsightSelectors=[{"InsightType": "ApiCallRateInsight"}]
     )
 
-    resp.should.have.key("TrailARN")
-    resp.should.have.key("InsightSelectors").equals(
-        [{"InsightType": "ApiCallRateInsight"}]
-    )
+    assert "TrailARN" in resp
+    assert resp["InsightSelectors"] == [{"InsightType": "ApiCallRateInsight"}]
 
     if using_arn:
         trail_arn = resp["TrailARN"]
@@ -191,10 +184,8 @@ def test_put_insight_selectors(using_arn):
     else:
         resp = client.get_insight_selectors(TrailName=trail_name)
 
-    resp.should.have.key("TrailARN")
-    resp.should.have.key("InsightSelectors").equals(
-        [{"InsightType": "ApiCallRateInsight"}]
-    )
+    assert "TrailARN" in resp
+    assert resp["InsightSelectors"] == [{"InsightType": "ApiCallRateInsight"}]
 
 
 @mock_cloudtrail
@@ -204,5 +195,5 @@ def test_get_insight_selectors():
     _, resp, trail_name = create_trail_simple(region_name="eu-west-1")
     resp = client.get_insight_selectors(TrailName=trail_name)
 
-    resp.should.have.key("TrailARN")
-    resp.shouldnt.have.key("InsightSelectors")
+    assert "TrailARN" in resp
+    assert "InsightSelectors" not in resp
diff --git a/tests/test_cloudtrail/test_cloudtrail_tags.py b/tests/test_cloudtrail/test_cloudtrail_tags.py
index 4a399a71f..2c60719b2 100644
--- a/tests/test_cloudtrail/test_cloudtrail_tags.py
+++ b/tests/test_cloudtrail/test_cloudtrail_tags.py
@@ -15,10 +15,11 @@ def test_add_tags():
     client.add_tags(ResourceId=trail_arn, TagsList=[{"Key": "k1", "Value": "v1"}])
 
     resp = client.list_tags(ResourceIdList=[trail_arn])
-    resp.should.have.key("ResourceTagList").length_of(1)
-    resp["ResourceTagList"][0].should.equal(
-        {"ResourceId": trail_arn, "TagsList": [{"Key": "k1", "Value": "v1"}]}
-    )
+    assert len(resp["ResourceTagList"]) == 1
+    assert resp["ResourceTagList"][0] == {
+        "ResourceId": trail_arn,
+        "TagsList": [{"Key": "k1", "Value": "v1"}],
+    }
 
 
 @mock_cloudtrail
@@ -38,13 +39,11 @@ def test_remove_tags():
 
     # Verify the first and third tag are still there
     resp = client.list_tags(ResourceIdList=[trail_arn])
-    resp.should.have.key("ResourceTagList").length_of(1)
-    resp["ResourceTagList"][0].should.equal(
-        {
-            "ResourceId": trail_arn,
-            "TagsList": [{"Key": "tk", "Value": "tv"}, {"Key": "tk3", "Value": "tv3"}],
-        }
-    )
+    assert len(resp["ResourceTagList"]) == 1
+    assert resp["ResourceTagList"][0] == {
+        "ResourceId": trail_arn,
+        "TagsList": [{"Key": "tk", "Value": "tv"}, {"Key": "tk3", "Value": "tv3"}],
+    }
 
 
 @mock_cloudtrail
@@ -55,8 +54,8 @@ def test_create_trail_without_tags_and_list_tags():
     trail_arn = resp["TrailARN"]
 
     resp = client.list_tags(ResourceIdList=[trail_arn])
-    resp.should.have.key("ResourceTagList").length_of(1)
-    resp["ResourceTagList"][0].should.equal({"ResourceId": trail_arn, "TagsList": []})
+    assert len(resp["ResourceTagList"]) == 1
+    assert resp["ResourceTagList"][0] == {"ResourceId": trail_arn, "TagsList": []}
 
 
 @mock_cloudtrail
@@ -68,10 +67,8 @@ def test_create_trail_with_tags_and_list_tags():
     trail_arn = resp["TrailARN"]
 
     resp = client.list_tags(ResourceIdList=[trail_arn])
-    resp.should.have.key("ResourceTagList").length_of(1)
-    resp["ResourceTagList"][0].should.equal(
-        {
-            "ResourceId": trail_arn,
-            "TagsList": [{"Key": "tk", "Value": "tv"}, {"Key": "tk2", "Value": "tv2"}],
-        }
-    )
+    assert len(resp["ResourceTagList"]) == 1
+    assert resp["ResourceTagList"][0] == {
+        "ResourceId": trail_arn,
+        "TagsList": [{"Key": "tk", "Value": "tv"}, {"Key": "tk2", "Value": "tv2"}],
+    }
diff --git a/tests/test_cloudtrail/test_server.py b/tests/test_cloudtrail/test_server.py
index 2735584c0..df0af5d70 100644
--- a/tests/test_cloudtrail/test_server.py
+++ b/tests/test_cloudtrail/test_server.py
@@ -1,6 +1,5 @@
 """Test different server responses."""
 import json
-import sure  # noqa # pylint: disable=unused-import
 
 import moto.server as server
 from moto import mock_cloudtrail
@@ -16,4 +15,4 @@ def test_cloudtrail_list():
     }
     res = test_client.post("/", headers=headers)
     data = json.loads(res.data)
-    data.should.equal({"Trails": []})
+    assert data == {"Trails": []}
diff --git a/tests/test_efs/test_access_point_tagging.py b/tests/test_efs/test_access_point_tagging.py
index a92ab24a6..8b249c66a 100644
--- a/tests/test_efs/test_access_point_tagging.py
+++ b/tests/test_efs/test_access_point_tagging.py
@@ -17,7 +17,7 @@ def test_list_tags_for_resource__without_tags(efs, file_system):
     ]
 
     resp = efs.list_tags_for_resource(ResourceId=ap_id)
-    resp.should.have.key("Tags").equals([])
+    assert resp["Tags"] == []
 
 
 def test_list_tags_for_resource__with_tags(efs, file_system):
@@ -30,9 +30,10 @@ def test_list_tags_for_resource__with_tags(efs, file_system):
     )["AccessPointId"]
 
     resp = efs.list_tags_for_resource(ResourceId=ap_id)
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key", "Value": "value"}, {"Key": "Name", "Value": "myname"}]
-    )
+    assert resp["Tags"] == [
+        {"Key": "key", "Value": "value"},
+        {"Key": "Name", "Value": "myname"},
+    ]
 
 
 def test_tag_resource(efs, file_system):
@@ -48,9 +49,10 @@ def test_tag_resource(efs, file_system):
     )
 
     resp = efs.list_tags_for_resource(ResourceId=ap_id)
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key", "Value": "value"}, {"Key": "Name", "Value": "myname"}]
-    )
+    assert resp["Tags"] == [
+        {"Key": "key", "Value": "value"},
+        {"Key": "Name", "Value": "myname"},
+    ]
 
 
 def test_untag_resource(efs, file_system):
@@ -70,6 +72,7 @@ def test_untag_resource(efs, file_system):
     efs.untag_resource(ResourceId=ap_id, TagKeys=["key2"])
 
     resp = efs.list_tags_for_resource(ResourceId=ap_id)
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key1", "Value": "val1"}, {"Key": "key3", "Value": "val3"}]
-    )
+    assert resp["Tags"] == [
+        {"Key": "key1", "Value": "val1"},
+        {"Key": "key3", "Value": "val3"},
+    ]
diff --git a/tests/test_efs/test_access_points.py b/tests/test_efs/test_access_points.py
index 64061b042..be783a75c 100644
--- a/tests/test_efs/test_access_points.py
+++ b/tests/test_efs/test_access_points.py
@@ -14,21 +14,21 @@ def fixture_file_system(efs):
 
 def test_describe_access_points__initial(efs):
     resp = efs.describe_access_points()
-    resp.should.have.key("AccessPoints").equals([])
+    assert resp["AccessPoints"] == []
 
 
 def test_create_access_point__simple(efs, file_system):
     fs_id = file_system["FileSystemId"]
 
     resp = efs.create_access_point(ClientToken="ct", FileSystemId=fs_id)
-    resp.should.have.key("ClientToken").equals("ct")
-    resp.should.have.key("AccessPointId")
-    resp.should.have.key("AccessPointArn")
-    resp.should.have.key("FileSystemId").equals(fs_id)
-    resp.should.have.key("OwnerId").equals(ACCOUNT_ID)
-    resp.should.have.key("LifeCycleState").equals("available")
+    assert resp["ClientToken"] == "ct"
+    assert "AccessPointId" in resp
+    assert "AccessPointArn" in resp
+    assert resp["FileSystemId"] == fs_id
+    assert resp["OwnerId"] == ACCOUNT_ID
+    assert resp["LifeCycleState"] == "available"
 
-    resp.should.have.key("RootDirectory").equals({"Path": "/"})
+    assert resp["RootDirectory"] == {"Path": "/"}
 
 
 def test_create_access_point__full(efs, file_system):
@@ -49,29 +49,26 @@ def test_create_access_point__full(efs, file_system):
         },
     )
 
-    resp.should.have.key("ClientToken").equals("ct")
-    resp.should.have.key("Name").equals("myname")
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key", "Value": "value"}, {"Key": "Name", "Value": "myname"}]
-    )
-    resp.should.have.key("AccessPointId")
-    resp.should.have.key("AccessPointArn")
-    resp.should.have.key("FileSystemId").equals(fs_id)
-    resp.should.have.key("PosixUser").equals(
-        {"Uid": 123, "Gid": 123, "SecondaryGids": [124, 125]}
-    )
-    resp.should.have.key("RootDirectory").equals(
-        {
-            "Path": "/root/path",
-            "CreationInfo": {
-                "OwnerUid": 987,
-                "OwnerGid": 986,
-                "Permissions": "root_permissions",
-            },
-        }
-    )
-    resp.should.have.key("OwnerId").equals(ACCOUNT_ID)
-    resp.should.have.key("LifeCycleState").equals("available")
+    assert resp["ClientToken"] == "ct"
+    assert resp["Name"] == "myname"
+    assert resp["Tags"] == [
+        {"Key": "key", "Value": "value"},
+        {"Key": "Name", "Value": "myname"},
+    ]
+    assert "AccessPointId" in resp
+    assert "AccessPointArn" in resp
+    assert resp["FileSystemId"] == fs_id
+    assert resp["PosixUser"] == {"Uid": 123, "Gid": 123, "SecondaryGids": [124, 125]}
+    assert resp["RootDirectory"] == {
+        "Path": "/root/path",
+        "CreationInfo": {
+            "OwnerUid": 987,
+            "OwnerGid": 986,
+            "Permissions": "root_permissions",
+        },
+    }
+    assert resp["OwnerId"] == ACCOUNT_ID
+    assert resp["LifeCycleState"] == "available"
 
 
 def test_describe_access_point(efs, file_system):
@@ -82,15 +79,15 @@ def test_describe_access_point(efs, file_system):
     ]
 
     resp = efs.describe_access_points(AccessPointId=access_point_id)
-    resp.should.have.key("AccessPoints").length_of(1)
+    assert len(resp["AccessPoints"]) == 1
     access_point = resp["AccessPoints"][0]
 
-    access_point.should.have.key("ClientToken").equals("ct")
-    access_point.should.have.key("AccessPointId")
-    access_point.should.have.key("AccessPointArn")
-    access_point.should.have.key("FileSystemId").equals(fs_id)
-    access_point.should.have.key("OwnerId").equals(ACCOUNT_ID)
-    access_point.should.have.key("LifeCycleState").equals("available")
+    assert access_point["ClientToken"] == "ct"
+    assert "AccessPointId" in access_point
+    assert "AccessPointArn" in access_point
+    assert access_point["FileSystemId"] == fs_id
+    assert access_point["OwnerId"] == ACCOUNT_ID
+    assert access_point["LifeCycleState"] == "available"
 
 
 def test_describe_access_points__multiple(efs, file_system):
@@ -100,7 +97,7 @@ def test_describe_access_points__multiple(efs, file_system):
     efs.create_access_point(ClientToken="ct2", FileSystemId=fs_id)
 
     resp = efs.describe_access_points()
-    resp.should.have.key("AccessPoints").length_of(2)
+    assert len(resp["AccessPoints"]) == 2
 
 
 def test_delete_access_points(efs, file_system):
@@ -118,7 +115,7 @@ def test_delete_access_points(efs, file_system):
 
     # We can only find one
     resp = efs.describe_access_points()
-    resp.should.have.key("AccessPoints").length_of(1)
+    assert len(resp["AccessPoints"]) == 1
 
     # The first one still exists
     efs.describe_access_points(AccessPointId=ap_id1)
@@ -127,4 +124,4 @@ def test_delete_access_points(efs, file_system):
     with pytest.raises(ClientError) as exc_info:
         efs.describe_access_points(AccessPointId=ap_id2)
     err = exc_info.value.response["Error"]
-    err["Code"].should.equal("AccessPointNotFound")
+    assert err["Code"] == "AccessPointNotFound"
diff --git a/tests/test_efs/test_file_system.py b/tests/test_efs/test_file_system.py
index 9525b727f..324bfb0cb 100644
--- a/tests/test_efs/test_file_system.py
+++ b/tests/test_efs/test_file_system.py
@@ -171,8 +171,8 @@ def test_describe_file_systems_using_identifier(efs):
 
     # Describe the file system.
     desc_fs_resp = efs.describe_file_systems(FileSystemId=fs_id)
-    desc_fs_resp.should.have.key("FileSystems").length_of(1)
-    desc_fs_resp["FileSystems"][0].should.have.key("FileSystemId").equals(fs_id)
+    assert len(desc_fs_resp["FileSystems"]) == 1
+    assert desc_fs_resp["FileSystems"][0]["FileSystemId"] == fs_id
     assert desc_fs_resp["FileSystems"][0]["Name"] == ""
 
 
@@ -180,9 +180,9 @@ def test_describe_file_systems_using_unknown_identifier(efs):
     with pytest.raises(ClientError) as exc:
         efs.describe_file_systems(FileSystemId="unknown")
     err = exc.value.response["Error"]
-    err["Code"].should.equal("FileSystemNotFound")
+    assert err["Code"] == "FileSystemNotFound"
     # Verified against AWS
-    err["Message"].should.equal("File system 'unknown' does not exist.")
+    assert err["Message"] == "File system 'unknown' does not exist."
 
 
 def test_describe_file_systems_minimal_case(efs):
diff --git a/tests/test_efs/test_filesystem_tagging.py b/tests/test_efs/test_filesystem_tagging.py
index c5e025d10..6b18c4cd0 100644
--- a/tests/test_efs/test_filesystem_tagging.py
+++ b/tests/test_efs/test_filesystem_tagging.py
@@ -6,7 +6,7 @@ def test_list_tags_for_resource__without_tags(efs):
     fs_id = file_system["FileSystemId"]
 
     resp = efs.list_tags_for_resource(ResourceId=fs_id)
-    resp.should.have.key("Tags").equals([])
+    assert resp["Tags"] == []
 
 
 def test_list_tags_for_resource__with_tags(efs):
@@ -17,9 +17,10 @@ def test_list_tags_for_resource__with_tags(efs):
     fs_id = file_system["FileSystemId"]
 
     resp = efs.list_tags_for_resource(ResourceId=fs_id)
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key", "Value": "value"}, {"Key": "Name", "Value": "myname"}]
-    )
+    assert resp["Tags"] == [
+        {"Key": "key", "Value": "value"},
+        {"Key": "Name", "Value": "myname"},
+    ]
 
 
 def test_tag_resource(efs):
@@ -35,9 +36,10 @@ def test_tag_resource(efs):
     )
 
     resp = efs.list_tags_for_resource(ResourceId=fs_id)
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key", "Value": "value"}, {"Key": "Name", "Value": "myname"}]
-    )
+    assert resp["Tags"] == [
+        {"Key": "key", "Value": "value"},
+        {"Key": "Name", "Value": "myname"},
+    ]
 
 
 def test_untag_resource(efs):
@@ -54,6 +56,7 @@ def test_untag_resource(efs):
     efs.untag_resource(ResourceId=fs_id, TagKeys=["key2"])
 
     resp = efs.list_tags_for_resource(ResourceId=fs_id)
-    resp.should.have.key("Tags").equals(
-        [{"Key": "key1", "Value": "val1"}, {"Key": "key3", "Value": "val3"}]
-    )
+    assert resp["Tags"] == [
+        {"Key": "key1", "Value": "val1"},
+        {"Key": "key3", "Value": "val3"},
+    ]
diff --git a/tests/test_efs/test_lifecycle_config.py b/tests/test_efs/test_lifecycle_config.py
index 6c1f7f896..1b92fa51e 100644
--- a/tests/test_efs/test_lifecycle_config.py
+++ b/tests/test_efs/test_lifecycle_config.py
@@ -8,8 +8,8 @@ def test_describe_filesystem_config__unknown(efs):
     with pytest.raises(ClientError) as exc_info:
         efs.describe_lifecycle_configuration(FileSystemId="unknown")
     err = exc_info.value.response["Error"]
-    err["Code"].should.equal("FileSystemNotFound")
-    err["Message"].should.equal("File system 'unknown' does not exist.")
+    assert err["Code"] == "FileSystemNotFound"
+    assert err["Message"] == "File system 'unknown' does not exist."
 
 
 def test_describe_filesystem_config__initial(efs):
@@ -17,7 +17,7 @@ def test_describe_filesystem_config__initial(efs):
     fs_id = create_fs_resp["FileSystemId"]
 
     resp = efs.describe_lifecycle_configuration(FileSystemId=fs_id)
-    resp.should.have.key("LifecyclePolicies").equals([])
+    assert resp["LifecyclePolicies"] == []
 
 
 def test_put_lifecycle_configuration(efs):
@@ -30,10 +30,10 @@ def test_put_lifecycle_configuration(efs):
     resp = efs.put_lifecycle_configuration(
         FileSystemId=fs_id, LifecyclePolicies=[{"TransitionToIA": "AFTER_30_DAYS"}]
     )
-    resp.should.have.key("LifecyclePolicies").length_of(1)
-    resp["LifecyclePolicies"][0].should.equal({"TransitionToIA": "AFTER_30_DAYS"})
+    assert len(resp["LifecyclePolicies"]) == 1
+    assert resp["LifecyclePolicies"][0] == {"TransitionToIA": "AFTER_30_DAYS"}
 
     # Describe the lifecycle configuration
     resp = efs.describe_lifecycle_configuration(FileSystemId=fs_id)
-    resp.should.have.key("LifecyclePolicies").length_of(1)
-    resp["LifecyclePolicies"][0].should.equal({"TransitionToIA": "AFTER_30_DAYS"})
+    assert len(resp["LifecyclePolicies"]) == 1
+    assert resp["LifecyclePolicies"][0] == {"TransitionToIA": "AFTER_30_DAYS"}
diff --git a/tests/test_efs/test_mount_target.py b/tests/test_efs/test_mount_target.py
index b5f1209b0..e168a2440 100644
--- a/tests/test_efs/test_mount_target.py
+++ b/tests/test_efs/test_mount_target.py
@@ -258,10 +258,8 @@ def test_describe_mount_targets__by_access_point_id(
     ap_resp = efs.describe_mount_targets(AccessPointId=access_point_id)
 
     # Check the list results.
-    ap_resp.should.have.key("MountTargets").length_of(1)
-    ap_resp["MountTargets"][0]["MountTargetId"].should.equal(
-        create_resp["MountTargetId"]
-    )
+    assert len(ap_resp["MountTargets"]) == 1
+    assert ap_resp["MountTargets"][0]["MountTargetId"] == create_resp["MountTargetId"]
 
 
 def test_describe_mount_targets_paging(efs, ec2, file_system):
diff --git a/tests/test_efs/test_mount_target_security_groups.py b/tests/test_efs/test_mount_target_security_groups.py
index 552fe544b..b5858fa17 100644
--- a/tests/test_efs/test_mount_target_security_groups.py
+++ b/tests/test_efs/test_mount_target_security_groups.py
@@ -22,8 +22,8 @@ def test_describe_mount_target_security_groups__unknown(efs):
     with pytest.raises(ClientError) as exc_info:
         efs.describe_mount_target_security_groups(MountTargetId="mt-asdf1234asdf")
     err = exc_info.value.response["Error"]
-    err["Code"].should.equal("MountTargetNotFound")
-    err["Message"].should.equal("Mount target 'mt-asdf1234asdf' does not exist.")
+    assert err["Code"] == "MountTargetNotFound"
+    assert err["Message"] == "Mount target 'mt-asdf1234asdf' does not exist."
 
 
 def test_describe_mount_target_security_groups(efs, ec2, file_system, subnet):
@@ -44,7 +44,7 @@ def test_describe_mount_target_security_groups(efs, ec2, file_system, subnet):
 
     # Describe it's Security Groups
     resp = efs.describe_mount_target_security_groups(MountTargetId=mount_target_id)
-    resp.should.have.key("SecurityGroups").equals([security_group_id])
+    assert resp["SecurityGroups"] == [security_group_id]
 
 
 def test_modify_mount_target_security_groups__unknown(efs):
@@ -53,8 +53,8 @@ def test_modify_mount_target_security_groups__unknown(efs):
             MountTargetId="mt-asdf1234asdf", SecurityGroups=[]
         )
     err = exc_info.value.response["Error"]
-    err["Code"].should.equal("MountTargetNotFound")
-    err["Message"].should.equal("Mount target 'mt-asdf1234asdf' does not exist.")
+    assert err["Code"] == "MountTargetNotFound"
+    assert err["Message"] == "Mount target 'mt-asdf1234asdf' does not exist."
 
 
 def test_modify_mount_target_security_groups(efs, ec2, file_system, subnet):
@@ -89,12 +89,13 @@ def test_modify_mount_target_security_groups(efs, ec2, file_system, subnet):
 
     # Describe it's Security Groups
     resp = efs.describe_mount_target_security_groups(MountTargetId=mount_target_id)
-    resp.should.have.key("SecurityGroups").equals([sg_id_2, sg_id_3])
+    assert resp["SecurityGroups"] == [sg_id_2, sg_id_3]
 
     # Verify EC2 reflects this change
     resp = ec2.describe_network_interfaces(NetworkInterfaceIds=[network_interface_id])
     network_interface = resp["NetworkInterfaces"][0]
-    network_interface["Groups"].should.have.length_of(2)
-    set([sg["GroupId"] for sg in network_interface["Groups"]]).should.equal(
-        {sg_id_2, sg_id_3}
-    )
+    assert len(network_interface["Groups"]) == 2
+    assert set([sg["GroupId"] for sg in network_interface["Groups"]]) == {
+        sg_id_2,
+        sg_id_3,
+    }
diff --git a/tests/test_greengrass/test_greengrass_core.py b/tests/test_greengrass/test_greengrass_core.py
index 684745807..ae1ff0d6d 100644
--- a/tests/test_greengrass/test_greengrass_core.py
+++ b/tests/test_greengrass/test_greengrass_core.py
@@ -11,7 +11,6 @@ from moto.settings import TEST_SERVER_MODE
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_core_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -25,20 +24,19 @@ def test_create_core_definition():
 
     core_name = "TestCore"
     res = client.create_core_definition(InitialVersion=initial_version, Name=core_name)
-    res.should.have.key("Arn")
-    res.should.have.key("Id")
+    assert "Arn" in res
+    assert "Id" in res
     if not TEST_SERVER_MODE:
-        res.should.have.key("CreationTimestamp").equals("2022-06-01T12:00:00.000Z")
-        res.should.have.key("LastUpdatedTimestamp").equals("2022-06-01T12:00:00.000Z")
-    res.should.have.key("LatestVersionArn")
-    res.should.have.key("Name").equals(core_name)
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
+        assert res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert "LatestVersionArn" in res
+    assert res["Name"] == core_name
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 201
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_core_definitions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -52,27 +50,22 @@ def test_list_core_definitions():
     core_name = "TestCore"
     client.create_core_definition(InitialVersion=initial_version, Name=core_name)
     res = client.list_core_definitions()
-    res.should.have.key("Definitions")
+    assert "Definitions" in res
     core_definition = res["Definitions"][0]
 
-    core_definition.should.have.key("Name").equals(core_name)
-    core_definition.should.have.key("Arn")
-    core_definition.should.have.key("Id")
-    core_definition.should.have.key("LatestVersion")
-    core_definition.should.have.key("LatestVersionArn")
+    assert core_definition["Name"] == core_name
+    assert "Arn" in core_definition
+    assert "Id" in core_definition
+    assert "LatestVersion" in core_definition
+    assert "LatestVersionArn" in core_definition
     if not TEST_SERVER_MODE:
-        core_definition.should.have.key("CreationTimestamp").equal(
-            "2022-06-01T12:00:00.000Z"
-        )
-        core_definition.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert core_definition["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert core_definition["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_core_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -95,22 +88,19 @@ def test_get_core_definition():
 
     get_res = client.get_core_definition(CoreDefinitionId=core_def_id)
 
-    get_res.should.have.key("Name").equals(core_name)
-    get_res.should.have.key("Arn").equals(arn)
-    get_res.should.have.key("Id").equals(core_def_id)
-    get_res.should.have.key("LatestVersion").equals(latest_version)
-    get_res.should.have.key("LatestVersionArn").equals(latest_version_arn)
+    assert get_res["Name"] == core_name
+    assert get_res["Arn"] == arn
+    assert get_res["Id"] == core_def_id
+    assert get_res["LatestVersion"] == latest_version
+    assert get_res["LatestVersionArn"] == latest_version_arn
 
     if not TEST_SERVER_MODE:
-        get_res.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        get_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert get_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert get_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_delete_core_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -131,15 +121,13 @@ def test_delete_core_definition():
     client.delete_core_definition(CoreDefinitionId=core_def_id)
     with pytest.raises(ClientError) as ex:
         client.delete_core_definition(CoreDefinitionId=core_def_id)
-    ex.value.response["Error"]["Message"].should.equal(
-        "That cores definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That cores definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_update_core_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -157,12 +145,11 @@ def test_update_core_definition():
     updated_core_name = "UpdatedCore"
     client.update_core_definition(CoreDefinitionId=core_def_id, Name="UpdatedCore")
     get_res = client.get_core_definition(CoreDefinitionId=core_def_id)
-    get_res.should.have.key("Name").equals(updated_core_name)
+    assert get_res["Name"] == updated_core_name
 
 
 @mock_greengrass
 def test_update_core_definition_with_empty_name():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -180,32 +167,26 @@ def test_update_core_definition_with_empty_name():
 
     with pytest.raises(ClientError) as ex:
         client.update_core_definition(CoreDefinitionId=core_def_id, Name="")
-    ex.value.response["Error"]["Message"].should.equal(
-        "Input does not contain any attributes to be updated"
-    )
-    ex.value.response["Error"]["Code"].should.equal(
-        "InvalidContainerDefinitionException"
-    )
+    err = ex.value.response["Error"]
+    assert err["Message"] == "Input does not contain any attributes to be updated"
+    assert err["Code"] == "InvalidContainerDefinitionException"
 
 
 @mock_greengrass
 def test_update_core_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.update_core_definition(
             CoreDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6", Name="abc"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That cores definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That cores definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_core_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_cores = [
         {
@@ -233,18 +214,17 @@ def test_create_core_definition_version():
     core_def_ver_res = client.create_core_definition_version(
         CoreDefinitionId=core_def_id, Cores=v2_cores
     )
-    core_def_ver_res.should.have.key("Arn")
-    core_def_ver_res.should.have.key("CreationTimestamp")
+    assert "Arn" in core_def_ver_res
+    assert "CreationTimestamp" in core_def_ver_res
     if not TEST_SERVER_MODE:
-        core_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
-    core_def_ver_res.should.have.key("Id").equals(core_def_id)
-    core_def_ver_res.should.have.key("Version")
+        assert core_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert core_def_ver_res["Id"] == core_def_id
+    assert "Version" in core_def_ver_res
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_core_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     initial_version = {
         "Cores": [
@@ -266,18 +246,17 @@ def test_get_core_definition_version():
         CoreDefinitionId=core_def_id, CoreDefinitionVersionId=core_def_ver_id
     )
 
-    core_def_ver_res.should.have.key("Arn")
-    core_def_ver_res.should.have.key("CreationTimestamp")
-    core_def_ver_res.should.have.key("Definition").should.equal(initial_version)
+    assert "Arn" in core_def_ver_res
+    assert "CreationTimestamp" in core_def_ver_res
+    assert core_def_ver_res["Definition"] == initial_version
     if not TEST_SERVER_MODE:
-        core_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
-    core_def_ver_res.should.have.key("Id").equals(core_def_id)
-    core_def_ver_res.should.have.key("Version")
+        assert core_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert core_def_ver_res["Id"] == core_def_id
+    assert "Version" in core_def_ver_res
 
 
 @mock_greengrass
 def test_get_core_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
@@ -285,15 +264,13 @@ def test_get_core_definition_version_with_invalid_id():
             CoreDefinitionId="fe2392e9-e67f-4308-af1b-ff94a128b231",
             CoreDefinitionVersionId="cd2ea6dc-6634-4e89-8441-8003500435f9",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That cores definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That cores definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_get_core_definition_version_with_invalid_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     core_def_res = client.create_core_definition(
         Name="TestCore",
@@ -313,16 +290,17 @@ def test_get_core_definition_version_with_invalid_version_id():
         client.get_core_definition_version(
             CoreDefinitionId=core_def_id, CoreDefinitionVersionId=invalid_version_id
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {invalid_version_id} of Core List Definition {core_def_id} does not exist."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Version {invalid_version_id} of Core List Definition {core_def_id} does not exist."
     )
-    ex.value.response["Error"]["Code"].should.equal("VersionNotFoundException")
+    assert err["Code"] == "VersionNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_core_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     initial_version = {
         "Cores": [
@@ -342,27 +320,25 @@ def test_list_core_definition_version():
         CoreDefinitionId=core_def_id
     )
 
-    core_def_vers_res.should.have.key("Versions")
+    assert "Versions" in core_def_vers_res
     core_def_ver = core_def_vers_res["Versions"][0]
-    core_def_ver.should.have.key("Arn")
-    core_def_ver.should.have.key("CreationTimestamp")
+    assert "Arn" in core_def_ver
+    assert "CreationTimestamp" in core_def_ver
 
     if not TEST_SERVER_MODE:
-        core_def_ver["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
-    core_def_ver.should.have.key("Id").equals(core_def_id)
-    core_def_ver.should.have.key("Version")
+        assert core_def_ver["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert core_def_ver["Id"] == core_def_id
+    assert "Version" in core_def_ver
 
 
 @mock_greengrass
 def test_list_core_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.list_core_definition_versions(
             CoreDefinitionId="cd2ea6dc-6634-4e89-8441-8003500435f9"
         )
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "That cores definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That cores definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
diff --git a/tests/test_greengrass/test_greengrass_deployment.py b/tests/test_greengrass/test_greengrass_deployment.py
index 791cae16d..4d0bdccae 100644
--- a/tests/test_greengrass/test_greengrass_deployment.py
+++ b/tests/test_greengrass/test_greengrass_deployment.py
@@ -12,7 +12,6 @@ from moto.settings import TEST_SERVER_MODE
 
 @mock_greengrass
 def test_create_deployment():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -36,14 +35,13 @@ def test_create_deployment():
     res = client.create_deployment(
         GroupId=group_id, GroupVersionId=latest_grp_ver, DeploymentType="NewDeployment"
     )
-    res.should.have.key("DeploymentArn")
-    res.should.have.key("DeploymentId")
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "DeploymentArn" in res
+    assert "DeploymentId" in res
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @mock_greengrass
 def test_re_deployment_with_no_deployment_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -70,15 +68,16 @@ def test_re_deployment_with_no_deployment_id():
             GroupVersionId=latest_grp_ver,
             DeploymentType="Redeployment",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "Your request is missing the following required parameter(s): {DeploymentId}."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "Your request is missing the following required parameter(s): {DeploymentId}."
     )
-    ex.value.response["Error"]["Code"].should.equal("InvalidInputException")
+    assert err["Code"] == "InvalidInputException"
 
 
 @mock_greengrass
 def test_re_deployment_with_invalid_deployment_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -107,15 +106,13 @@ def test_re_deployment_with_invalid_deployment_id():
             DeploymentType="Redeployment",
             DeploymentId=deployment_id,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Deployment ID '{deployment_id}' is invalid."
-    )
-    ex.value.response["Error"]["Code"].should.equal("InvalidInputException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == f"Deployment ID '{deployment_id}' is invalid."
+    assert err["Code"] == "InvalidInputException"
 
 
 @mock_greengrass
 def test_create_deployment_with_no_core_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_group_res = client.create_group(Name="TestGroup")
     group_id = create_group_res["Id"]
@@ -128,20 +125,20 @@ def test_create_deployment_with_no_core_group():
             DeploymentType="NewDeployment",
         )
 
-    ex.value.response["ResponseMetadata"]["HTTPStatusCode"].should.equal(400)
-    ex.value.response["Error"]["Code"].should.equal("MissingCoreException")
+    assert ex.value.response["ResponseMetadata"]["HTTPStatusCode"] == 400
+    assert ex.value.response["Error"]["Code"] == "MissingCoreException"
     err = json.loads(ex.value.response["Error"]["Message"])
     err_details = err["ErrorDetails"]
 
-    err_details[0].should.have.key("DetailedErrorCode").equals("GG-303")
-    err_details[0].should.have.key("DetailedErrorMessage").equals(
-        "You need a Greengrass Core in this Group before you can deploy."
+    assert err_details[0]["DetailedErrorCode"] == "GG-303"
+    assert (
+        err_details[0]["DetailedErrorMessage"]
+        == "You need a Greengrass Core in this Group before you can deploy."
     )
 
 
 @mock_greengrass
 def test_create_deployment_with_invalid_group_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.create_deployment(
@@ -150,16 +147,15 @@ def test_create_deployment_with_invalid_group_id():
             DeploymentType="NewDeployment",
         )
 
-    ex.value.response["ResponseMetadata"]["HTTPStatusCode"].should.equal(404)
-    ex.value.response["Error"]["Code"].should.equal("ResourceNotFoundException")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That group definition does not exist."
+    assert ex.value.response["ResponseMetadata"]["HTTPStatusCode"] == 404
+    assert ex.value.response["Error"]["Code"] == "ResourceNotFoundException"
+    assert (
+        ex.value.response["Error"]["Message"] == "That group definition does not exist."
     )
 
 
 @mock_greengrass
 def test_create_deployment_with_invalid_group_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -187,16 +183,16 @@ def test_create_deployment_with_invalid_group_version_id():
             DeploymentType="NewDeployment",
         )
 
-    ex.value.response["ResponseMetadata"]["HTTPStatusCode"].should.equal(404)
-    ex.value.response["Error"]["Code"].should.equal("ResourceNotFoundException")
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {group_version_id} of Group Definition {group_id} does not exist."
+    assert ex.value.response["ResponseMetadata"]["HTTPStatusCode"] == 404
+    assert ex.value.response["Error"]["Code"] == "ResourceNotFoundException"
+    assert (
+        ex.value.response["Error"]["Message"]
+        == f"Version {group_version_id} of Group Definition {group_id} does not exist."
     )
 
 
 @mock_greengrass
 def test_create_deployment_with_invalid_deployment_type():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_group_res = client.create_group(Name="TestGroup")
     group_id = create_group_res["Id"]
@@ -209,17 +205,18 @@ def test_create_deployment_with_invalid_deployment_type():
             DeploymentType="InvalidDeploymentType",
         )
 
-    ex.value.response["ResponseMetadata"]["HTTPStatusCode"].should.equal(400)
-    ex.value.response["Error"]["Code"].should.equal("InvalidInputException")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That deployment type is not valid.  Please specify one of the following types: {NewDeployment,Redeployment,ResetDeployment,ForceResetDeployment}."
+    assert ex.value.response["ResponseMetadata"]["HTTPStatusCode"] == 400
+    err = ex.value.response["Error"]
+    assert err["Code"] == "InvalidInputException"
+    assert (
+        err["Message"]
+        == "That deployment type is not valid.  Please specify one of the following types: {NewDeployment,Redeployment,ResetDeployment,ForceResetDeployment}."
     )
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_deployments():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -246,23 +243,22 @@ def test_list_deployments():
     )
 
     res = client.list_deployments(GroupId=group_id)
-    res.should.have.key("Deployments")
+    assert "Deployments" in res
     deployments = res["Deployments"][0]
 
-    deployments.should.have.key("CreatedAt")
-    deployments.should.have.key("DeploymentArn")
-    deployments.should.have.key("DeploymentId")
-    deployments.should.have.key("DeploymentType").equals(deployment_type)
-    deployments.should.have.key("GroupArn").equals(latest_grp_ver_arn)
+    assert "CreatedAt" in deployments
+    assert "DeploymentArn" in deployments
+    assert "DeploymentId" in deployments
+    assert deployments["DeploymentType"] == deployment_type
+    assert deployments["GroupArn"] == latest_grp_ver_arn
 
     if not TEST_SERVER_MODE:
-        deployments.should.have.key("CreatedAt").equal("2022-06-01T12:00:00.000Z")
+        assert deployments["CreatedAt"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_deployment_status():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -290,18 +286,17 @@ def test_get_deployment_status():
     deployment_id = create_deployment_res["DeploymentId"]
     res = client.get_deployment_status(GroupId=group_id, DeploymentId=deployment_id)
 
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
-    res.should.have.key("DeploymentStatus").equal("InProgress")
-    res.should.have.key("DeploymentType").equal(deployment_type)
-    res.should.have.key("UpdatedAt")
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
+    assert res["DeploymentStatus"] == "InProgress"
+    assert res["DeploymentType"] == deployment_type
+    assert "UpdatedAt" in res
 
     if not TEST_SERVER_MODE:
-        res.should.have.key("UpdatedAt").equal("2022-06-01T12:00:00.000Z")
+        assert res["UpdatedAt"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_deployment_status_with_invalid_deployment_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_group_res = client.create_group(Name="TestGroup")
     group_id = create_group_res["Id"]
@@ -310,15 +305,13 @@ def test_get_deployment_status_with_invalid_deployment_id():
 
     with pytest.raises(ClientError) as ex:
         client.get_deployment_status(GroupId=group_id, DeploymentId=deployment_id)
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Deployment '{deployment_id}' does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("InvalidInputException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == f"Deployment '{deployment_id}' does not exist."
+    assert err["Code"] == "InvalidInputException"
 
 
 @mock_greengrass
 def test_get_deployment_status_with_invalid_group_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -349,10 +342,9 @@ def test_get_deployment_status_with_invalid_group_id():
         client.get_deployment_status(
             GroupId="7b0bdeae-54c7-47cf-9f93-561e672efd9c", DeploymentId=deployment_id
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Deployment '{deployment_id}' does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("InvalidInputException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == f"Deployment '{deployment_id}' does not exist."
+    assert err["Code"] == "InvalidInputException"
 
 
 @pytest.mark.skipif(
@@ -362,7 +354,6 @@ def test_get_deployment_status_with_invalid_group_id():
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_reset_deployments():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -389,20 +380,20 @@ def test_reset_deployments():
 
     reset_res = client.reset_deployments(GroupId=group_id)
 
-    reset_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
-    reset_res.should.have.key("DeploymentId")
-    reset_res.should.have.key("DeploymentArn")
+    assert reset_res["ResponseMetadata"]["HTTPStatusCode"] == 200
+    assert "DeploymentId" in reset_res
+    assert "DeploymentArn" in reset_res
 
     list_res = client.list_deployments(GroupId=group_id)
     reset_deployment = list_res["Deployments"][1]
-    reset_deployment.should.have.key("CreatedAt")
-    reset_deployment.should.have.key("DeploymentArn")
-    reset_deployment.should.have.key("DeploymentId")
-    reset_deployment.should.have.key("DeploymentType").should.equal("ResetDeployment")
-    reset_deployment.should.have.key("GroupArn").should.equal(group_arn)
+    assert "CreatedAt" in reset_deployment
+    assert "DeploymentArn" in reset_deployment
+    assert "DeploymentId" in reset_deployment
+    assert reset_deployment["DeploymentType"] == "ResetDeployment"
+    assert reset_deployment["GroupArn"] == group_arn
 
     if not TEST_SERVER_MODE:
-        reset_deployment["CreatedAt"].should.equal("2022-06-01T12:00:00.000Z")
+        assert reset_deployment["CreatedAt"] == "2022-06-01T12:00:00.000Z"
 
 
 @pytest.mark.skipif(
@@ -411,15 +402,13 @@ def test_reset_deployments():
 )
 @mock_greengrass
 def test_reset_deployments_with_invalid_group_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.reset_deployments(GroupId="7b0bdeae-54c7-47cf-9f93-561e672efd9c")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That Group Definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("ResourceNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That Group Definition does not exist."
+    assert err["Code"] == "ResourceNotFoundException"
 
 
 @pytest.mark.skipif(
@@ -428,7 +417,6 @@ def test_reset_deployments_with_invalid_group_id():
 )
 @mock_greengrass
 def test_reset_deployments_with_never_deployed_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -449,10 +437,12 @@ def test_reset_deployments_with_never_deployed_group():
 
     with pytest.raises(ClientError) as ex:
         client.reset_deployments(GroupId=group_id)
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Group id: {group_id} has not been deployed or has already been reset."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Group id: {group_id} has not been deployed or has already been reset."
     )
-    ex.value.response["Error"]["Code"].should.equal("ResourceNotFoundException")
+    assert err["Code"] == "ResourceNotFoundException"
 
 
 @pytest.mark.skipif(
@@ -461,7 +451,6 @@ def test_reset_deployments_with_never_deployed_group():
 )
 @mock_greengrass
 def test_reset_deployments_with_already_reset_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     cores = [
         {
@@ -488,7 +477,9 @@ def test_reset_deployments_with_already_reset_group():
 
     with pytest.raises(ClientError) as ex:
         client.reset_deployments(GroupId=group_id)
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Group id: {group_id} has not been deployed or has already been reset."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Group id: {group_id} has not been deployed or has already been reset."
     )
-    ex.value.response["Error"]["Code"].should.equal("ResourceNotFoundException")
+    assert err["Code"] == "ResourceNotFoundException"
diff --git a/tests/test_greengrass/test_greengrass_device.py b/tests/test_greengrass/test_greengrass_device.py
index 5390c55af..ad07706d9 100644
--- a/tests/test_greengrass/test_greengrass_device.py
+++ b/tests/test_greengrass/test_greengrass_device.py
@@ -11,7 +11,6 @@ from moto.settings import TEST_SERVER_MODE
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_device_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Devices": [
@@ -26,22 +25,21 @@ def test_create_device_definition():
 
     device_name = "TestDevice"
     res = client.create_device_definition(InitialVersion=init_ver, Name=device_name)
-    res.should.have.key("Arn")
-    res.should.have.key("Id")
-    res.should.have.key("LatestVersion")
-    res.should.have.key("LatestVersionArn")
-    res.should.have.key("Name").equals(device_name)
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
+    assert "Arn" in res
+    assert "Id" in res
+    assert "LatestVersion" in res
+    assert "LatestVersionArn" in res
+    assert res["Name"] == device_name
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 201
 
     if not TEST_SERVER_MODE:
-        res.should.have.key("CreationTimestamp").equals("2022-06-01T12:00:00.000Z")
-        res.should.have.key("LastUpdatedTimestamp").equals("2022-06-01T12:00:00.000Z")
+        assert res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_device_definitions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Devices": [
@@ -58,27 +56,22 @@ def test_list_device_definitions():
     client.create_device_definition(InitialVersion=init_ver, Name=device_name)
 
     res = client.list_device_definitions()
-    res.should.have.key("Definitions")
+    assert "Definitions" in res
     device_definition = res["Definitions"][0]
 
-    device_definition.should.have.key("Name").equals(device_name)
-    device_definition.should.have.key("Arn")
-    device_definition.should.have.key("Id")
-    device_definition.should.have.key("LatestVersion")
-    device_definition.should.have.key("LatestVersionArn")
+    assert device_definition["Name"] == device_name
+    assert "Arn" in device_definition
+    assert "Id" in device_definition
+    assert "LatestVersion" in device_definition
+    assert "LatestVersionArn" in device_definition
     if not TEST_SERVER_MODE:
-        device_definition.should.have.key("CreationTimestamp").equal(
-            "2022-06-01T12:00:00.000Z"
-        )
-        device_definition.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert device_definition["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert device_definition["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_device_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Devices": [
@@ -102,37 +95,32 @@ def test_get_device_definition():
 
     get_res = client.get_device_definition(DeviceDefinitionId=device_def_id)
 
-    get_res.should.have.key("Name").equals(device_name)
-    get_res.should.have.key("Arn").equals(arn)
-    get_res.should.have.key("Id").equals(device_def_id)
-    get_res.should.have.key("LatestVersion").equals(latest_version)
-    get_res.should.have.key("LatestVersionArn").equals(latest_version_arn)
+    assert get_res["Name"] == device_name
+    assert get_res["Arn"] == arn
+    assert get_res["Id"] == device_def_id
+    assert get_res["LatestVersion"] == latest_version
+    assert get_res["LatestVersionArn"] == latest_version_arn
 
     if not TEST_SERVER_MODE:
-        get_res.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        get_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert get_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert get_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_device_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_device_definition(
             DeviceDefinitionId="b552443b-1888-469b-81f8-0ebc5ca92949"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That Device List Definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That Device List Definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_device_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_devices = [
         {
@@ -161,19 +149,18 @@ def test_create_device_definition_version():
     device_def_ver_res = client.create_device_definition_version(
         DeviceDefinitionId=device_def_id, Devices=v2_devices
     )
-    device_def_ver_res.should.have.key("Arn")
-    device_def_ver_res.should.have.key("CreationTimestamp")
-    device_def_ver_res.should.have.key("Id").equals(device_def_id)
-    device_def_ver_res.should.have.key("Version")
+    assert "Arn" in device_def_ver_res
+    assert "CreationTimestamp" in device_def_ver_res
+    assert device_def_ver_res["Id"] == device_def_id
+    assert "Version" in device_def_ver_res
 
     if not TEST_SERVER_MODE:
-        device_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert device_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_device_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -192,15 +179,13 @@ def test_create_device_definition_version_with_invalid_id():
         client.create_device_definition_version(
             DeviceDefinitionId="123", Devices=devices
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That devices definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That devices definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_delete_device_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -217,27 +202,24 @@ def test_delete_device_definition():
 
     device_def_id = create_res["Id"]
     del_res = client.delete_device_definition(DeviceDefinitionId=device_def_id)
-    del_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert del_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @mock_greengrass
 def test_delete_device_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.delete_device_definition(
             DeviceDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That devices definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That devices definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_update_device_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -257,15 +239,14 @@ def test_update_device_definition():
     update_res = client.update_device_definition(
         DeviceDefinitionId=device_def_id, Name=updated_device_name
     )
-    update_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert update_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     get_res = client.get_device_definition(DeviceDefinitionId=device_def_id)
-    get_res.should.have.key("Name").equals(updated_device_name)
+    assert get_res["Name"] == updated_device_name
 
 
 @mock_greengrass
 def test_update_device_definition_with_empty_name():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -284,33 +265,27 @@ def test_update_device_definition_with_empty_name():
 
     with pytest.raises(ClientError) as ex:
         client.update_device_definition(DeviceDefinitionId=device_def_id, Name="")
-    ex.value.response["Error"]["Message"].should.equal(
-        "Input does not contain any attributes to be updated"
-    )
-    ex.value.response["Error"]["Code"].should.equal(
-        "InvalidContainerDefinitionException"
-    )
+    err = ex.value.response["Error"]
+    assert err["Message"] == "Input does not contain any attributes to be updated"
+    assert err["Code"] == "InvalidContainerDefinitionException"
 
 
 @mock_greengrass
 def test_update_device_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.update_device_definition(
             DeviceDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6", Name="123"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That devices definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That devices definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_device_definition_versions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -331,21 +306,20 @@ def test_list_device_definition_versions():
         DeviceDefinitionId=device_def_id
     )
 
-    device_def_vers_res.should.have.key("Versions")
+    assert "Versions" in device_def_vers_res
     device_def_ver = device_def_vers_res["Versions"][0]
-    device_def_ver.should.have.key("Arn")
-    device_def_ver.should.have.key("CreationTimestamp")
+    assert "Arn" in device_def_ver
+    assert "CreationTimestamp" in device_def_ver
 
     if not TEST_SERVER_MODE:
-        device_def_ver["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
-    device_def_ver.should.have.key("Id").equals(device_def_id)
-    device_def_ver.should.have.key("Version")
+        assert device_def_ver["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert device_def_ver["Id"] == device_def_id
+    assert "Version" in device_def_ver
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_device_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -368,33 +342,30 @@ def test_get_device_definition_version():
         DeviceDefinitionId=device_def_id, DeviceDefinitionVersionId=device_def_ver_id
     )
 
-    core_def_ver_res.should.have.key("Arn")
-    core_def_ver_res.should.have.key("CreationTimestamp")
-    core_def_ver_res.should.have.key("Definition").should.equal(initial_version)
+    assert "Arn" in core_def_ver_res
+    assert "CreationTimestamp" in core_def_ver_res
+    assert core_def_ver_res["Definition"] == initial_version
     if not TEST_SERVER_MODE:
-        core_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
-    core_def_ver_res.should.have.key("Id").equals(device_def_id)
-    core_def_ver_res.should.have.key("Version")
+        assert core_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert core_def_ver_res["Id"] == device_def_id
+    assert "Version" in core_def_ver_res
 
 
 @mock_greengrass
 def test_get_device_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_device_definition_version(
             DeviceDefinitionId="fe2392e9-e67f-4308-af1b-ff94a128b231",
             DeviceDefinitionVersionId="cd2ea6dc-6634-4e89-8441-8003500435f9",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That devices definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That devices definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_get_device_definition_version_with_invalid_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     devices = [
         {
@@ -417,7 +388,9 @@ def test_get_device_definition_version_with_invalid_version_id():
             DeviceDefinitionId=device_def_id,
             DeviceDefinitionVersionId=invalid_device_version_id,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {invalid_device_version_id} of Device List Definition {device_def_id} does not exist."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Version {invalid_device_version_id} of Device List Definition {device_def_id} does not exist."
     )
-    ex.value.response["Error"]["Code"].should.equal("VersionNotFoundException")
+    assert err["Code"] == "VersionNotFoundException"
diff --git a/tests/test_greengrass/test_greengrass_functions.py b/tests/test_greengrass/test_greengrass_functions.py
index 506920b01..2534f19f2 100644
--- a/tests/test_greengrass/test_greengrass_functions.py
+++ b/tests/test_greengrass/test_greengrass_functions.py
@@ -11,7 +11,6 @@ from moto.settings import TEST_SERVER_MODE
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_function_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Functions": [
@@ -29,22 +28,21 @@ def test_create_function_definition():
     }
     func_name = "TestFunc"
     res = client.create_function_definition(InitialVersion=init_ver, Name=func_name)
-    res.should.have.key("Arn")
-    res.should.have.key("Id")
-    res.should.have.key("LatestVersion")
-    res.should.have.key("LatestVersionArn")
-    res.should.have.key("Name").equals(func_name)
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
+    assert "Arn" in res
+    assert "Id" in res
+    assert "LatestVersion" in res
+    assert "LatestVersionArn" in res
+    assert res["Name"] == func_name
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 201
 
     if not TEST_SERVER_MODE:
-        res.should.have.key("CreationTimestamp").equals("2022-06-01T12:00:00.000Z")
-        res.should.have.key("LastUpdatedTimestamp").equals("2022-06-01T12:00:00.000Z")
+        assert res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_function_definitions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Functions": [
@@ -66,22 +64,19 @@ def test_list_function_definitions():
     res = client.list_function_definitions()
     func_def = res["Definitions"][0]
 
-    func_def.should.have.key("Name").equals(func_name)
-    func_def.should.have.key("Arn")
-    func_def.should.have.key("Id")
-    func_def.should.have.key("LatestVersion")
-    func_def.should.have.key("LatestVersionArn")
+    assert func_def["Name"] == func_name
+    assert "Arn" in func_def
+    assert "Id" in func_def
+    assert "LatestVersion" in func_def
+    assert "LatestVersionArn" in func_def
     if not TEST_SERVER_MODE:
-        func_def.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        func_def.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert func_def["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert func_def["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_function_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Functions": [
@@ -109,37 +104,32 @@ def test_get_function_definition():
 
     get_res = client.get_function_definition(FunctionDefinitionId=func_def_id)
 
-    get_res.should.have.key("Name").equals(func_name)
-    get_res.should.have.key("Arn").equals(arn)
-    get_res.should.have.key("Id").equals(func_def_id)
-    get_res.should.have.key("LatestVersion").equals(latest_version)
-    get_res.should.have.key("LatestVersionArn").equals(latest_version_arn)
-    get_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert get_res["Name"] == func_name
+    assert get_res["Arn"] == arn
+    assert get_res["Id"] == func_def_id
+    assert get_res["LatestVersion"] == latest_version
+    assert get_res["LatestVersionArn"] == latest_version_arn
+    assert get_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        get_res.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        get_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert get_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert get_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_function_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_function_definition(
             FunctionDefinitionId="b552443b-1888-469b-81f8-0ebc5ca92949"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That Lambda List Definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That Lambda List Definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_delete_function_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Functions": [
@@ -161,27 +151,24 @@ def test_delete_function_definition():
 
     func_def_id = create_res["Id"]
     del_res = client.delete_function_definition(FunctionDefinitionId=func_def_id)
-    del_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert del_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @mock_greengrass
 def test_delete_function_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.delete_function_definition(
             FunctionDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That lambdas definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That lambdas definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_update_function_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Functions": [
@@ -206,15 +193,14 @@ def test_update_function_definition():
     update_res = client.update_function_definition(
         FunctionDefinitionId=func_def_id, Name=updated_func_name
     )
-    update_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert update_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     get_res = client.get_function_definition(FunctionDefinitionId=func_def_id)
-    get_res.should.have.key("Name").equals(updated_func_name)
+    assert get_res["Name"] == updated_func_name
 
 
 @mock_greengrass
 def test_update_function_definition_with_empty_name():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Functions": [
@@ -238,33 +224,27 @@ def test_update_function_definition_with_empty_name():
 
     with pytest.raises(ClientError) as ex:
         client.update_function_definition(FunctionDefinitionId=func_def_id, Name="")
-    ex.value.response["Error"]["Message"].should.equal(
-        "Input does not contain any attributes to be updated"
-    )
-    ex.value.response["Error"]["Code"].should.equal(
-        "InvalidContainerDefinitionException"
-    )
+    err = ex.value.response["Error"]
+    assert err["Message"] == "Input does not contain any attributes to be updated"
+    assert err["Code"] == "InvalidContainerDefinitionException"
 
 
 @mock_greengrass
 def test_update_function_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.update_function_definition(
             FunctionDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6", Name="123"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That lambdas definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    rr = ex.value.response["Error"]
+    assert rr["Message"] == "That lambdas definition does not exist."
+    assert rr["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_function_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_functions = [
         {
@@ -301,18 +281,17 @@ def test_create_function_definition_version():
     func_def_ver_res = client.create_function_definition_version(
         FunctionDefinitionId=func_def_id, Functions=v2_functions
     )
-    func_def_ver_res.should.have.key("Arn")
-    func_def_ver_res.should.have.key("CreationTimestamp")
-    func_def_ver_res.should.have.key("Id").equals(func_def_id)
-    func_def_ver_res.should.have.key("Version")
+    assert "Arn" in func_def_ver_res
+    assert "CreationTimestamp" in func_def_ver_res
+    assert func_def_ver_res["Id"] == func_def_id
+    assert "Version" in func_def_ver_res
 
     if not TEST_SERVER_MODE:
-        func_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert func_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_create_function_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     functions = [
         {
@@ -331,14 +310,14 @@ def test_create_function_definition_version_with_invalid_id():
             FunctionDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
             Functions=functions,
         )
-    ex.value.response["Error"]["Message"].should.equal("That lambdas does not exist.")
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That lambdas does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_function_definition_versions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     functions = [
         {
@@ -363,36 +342,33 @@ def test_list_function_definition_versions():
         FunctionDefinitionId=func_def_id
     )
 
-    func_def_vers_res.should.have.key("Versions")
+    assert "Versions" in func_def_vers_res
     device_def_ver = func_def_vers_res["Versions"][0]
-    device_def_ver.should.have.key("Arn")
-    device_def_ver.should.have.key("CreationTimestamp")
+    assert "Arn" in device_def_ver
+    assert "CreationTimestamp" in device_def_ver
 
     if not TEST_SERVER_MODE:
-        device_def_ver["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
-    device_def_ver.should.have.key("Id").equals(func_def_id)
-    device_def_ver.should.have.key("Version")
+        assert device_def_ver["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+    assert device_def_ver["Id"] == func_def_id
+    assert "Version" in device_def_ver
 
 
 @mock_greengrass
 def test_list_function_definition_versions_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.list_function_definition_versions(
             FunctionDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That lambdas definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That lambdas definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_function_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     functions = [
         {
@@ -419,19 +395,18 @@ def test_get_function_definition_version():
         FunctionDefinitionId=func_def_id, FunctionDefinitionVersionId=func_def_ver_id
     )
 
-    func_def_ver_res.should.have.key("Arn")
-    func_def_ver_res.should.have.key("CreationTimestamp")
-    func_def_ver_res.should.have.key("Definition").should.equal(initial_version)
-    func_def_ver_res.should.have.key("Id").equals(func_def_id)
-    func_def_ver_res.should.have.key("Version")
+    assert "Arn" in func_def_ver_res
+    assert "CreationTimestamp" in func_def_ver_res
+    assert func_def_ver_res["Definition"] == initial_version
+    assert func_def_ver_res["Id"] == func_def_id
+    assert "Version" in func_def_ver_res
 
     if not TEST_SERVER_MODE:
-        func_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert func_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_function_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
@@ -439,15 +414,13 @@ def test_get_function_definition_version_with_invalid_id():
             FunctionDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
             FunctionDefinitionVersionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That lambdas definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That lambdas definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_get_function_definition_version_with_invalid_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     functions = [
         {
@@ -475,7 +448,9 @@ def test_get_function_definition_version_with_invalid_version_id():
             FunctionDefinitionId=func_def_id,
             FunctionDefinitionVersionId=invalid_func_def_ver_id,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {invalid_func_def_ver_id} of Lambda List Definition {func_def_id} does not exist."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Version {invalid_func_def_ver_id} of Lambda List Definition {func_def_id} does not exist."
     )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    assert err["Code"] == "IdNotFoundException"
diff --git a/tests/test_greengrass/test_greengrass_groups.py b/tests/test_greengrass/test_greengrass_groups.py
index 082a0c5f3..a0745e649 100644
--- a/tests/test_greengrass/test_greengrass_groups.py
+++ b/tests/test_greengrass/test_greengrass_groups.py
@@ -11,7 +11,6 @@ from moto.settings import TEST_SERVER_MODE
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_core_ver = {
         "Cores": [
@@ -32,27 +31,22 @@ def test_create_group():
 
     grp_name = "TestGroup"
     create_grp_res = client.create_group(Name=grp_name, InitialVersion=init_grp)
-    create_grp_res.should.have.key("Arn")
-    create_grp_res.should.have.key("Id")
-    create_grp_res.should.have.key("LastUpdatedTimestamp")
-    create_grp_res.should.have.key("LatestVersion")
-    create_grp_res.should.have.key("LatestVersionArn")
-    create_grp_res.should.have.key("Name").equals(grp_name)
-    create_grp_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
+    assert "Arn" in create_grp_res
+    assert "Id" in create_grp_res
+    assert "LastUpdatedTimestamp" in create_grp_res
+    assert "LatestVersion" in create_grp_res
+    assert "LatestVersionArn" in create_grp_res
+    assert create_grp_res["Name"] == grp_name
+    assert create_grp_res["ResponseMetadata"]["HTTPStatusCode"] == 201
 
     if not TEST_SERVER_MODE:
-        create_grp_res.should.have.key("CreationTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
-        create_grp_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert create_grp_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert create_grp_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_groups():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     grp_name = "TestGroup"
     create_grp_res = client.create_group(Name=grp_name)
@@ -61,20 +55,19 @@ def test_list_groups():
     list_res = client.list_groups()
 
     group = list_res["Groups"][0]
-    group.should.have.key("Name").equals(grp_name)
-    group.should.have.key("Arn")
-    group.should.have.key("Id").equals(group_id)
-    group.should.have.key("LatestVersion")
-    group.should.have.key("LatestVersionArn")
+    assert group["Name"] == grp_name
+    assert "Arn" in group
+    assert group["Id"] == group_id
+    assert "LatestVersion" in group
+    assert "LatestVersionArn" in group
     if not TEST_SERVER_MODE:
-        group.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        group.should.have.key("LastUpdatedTimestamp").equals("2022-06-01T12:00:00.000Z")
+        assert group["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert group["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     grp_name = "TestGroup"
     create_res = client.create_group(Name=grp_name)
@@ -85,74 +78,65 @@ def test_get_group():
 
     get_res = client.get_group(GroupId=group_id)
 
-    get_res.should.have.key("Name").equals(grp_name)
-    get_res.should.have.key("Arn").equals(group_arn)
-    get_res.should.have.key("Id").equals(group_id)
-    get_res.should.have.key("LatestVersion").equals(latest_version)
-    get_res.should.have.key("LatestVersionArn").equals(latest_version_arn)
-    get_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert get_res["Name"] == grp_name
+    assert get_res["Arn"] == group_arn
+    assert get_res["Id"] == group_id
+    assert get_res["LatestVersion"] == latest_version
+    assert get_res["LatestVersionArn"] == latest_version_arn
+    assert get_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        get_res.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        get_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert get_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert get_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_group_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_group(GroupId="b552443b-1888-469b-81f8-0ebc5ca92949")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That Group Definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That Group Definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_delete_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_res = client.create_group(Name="TestGroup")
 
     group_id = create_res["Id"]
     del_res = client.delete_group(GroupId=group_id)
-    del_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert del_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @mock_greengrass
 def test_delete_group_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.delete_group(GroupId="6fbffc21-989e-4d29-a793-a42f450a78c6")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That group definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That group definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_update_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_res = client.create_group(Name="TestGroup")
 
     group_id = create_res["Id"]
     updated_group_name = "UpdatedGroup"
     update_res = client.update_group(GroupId=group_id, Name=updated_group_name)
-    update_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert update_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     get_res = client.get_group(GroupId=group_id)
-    get_res.should.have.key("Name").equals(updated_group_name)
+    assert get_res["Name"] == updated_group_name
 
 
 @mock_greengrass
 def test_update_group_with_empty_name():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_res = client.create_group(Name="TestGroup")
 
@@ -160,54 +144,48 @@ def test_update_group_with_empty_name():
 
     with pytest.raises(ClientError) as ex:
         client.update_group(GroupId=group_id, Name="")
-    ex.value.response["Error"]["Message"].should.equal(
-        "Input does not contain any attributes to be updated"
-    )
-    ex.value.response["Error"]["Code"].should.equal(
-        "InvalidContainerDefinitionException"
-    )
+    err = ex.value.response["Error"]
+    assert err["Message"] == "Input does not contain any attributes to be updated"
+    assert err["Code"] == "InvalidContainerDefinitionException"
 
 
 @mock_greengrass
 def test_update_group_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.update_group(GroupId="6fbffc21-989e-4d29-a793-a42f450a78c6", Name="123")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That group definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That group definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_group_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_grp_res = client.create_group(Name="TestGroup")
     group_id = create_grp_res["Id"]
 
     group_ver_res = client.create_group_version(GroupId=group_id)
-    group_ver_res.should.have.key("Arn")
-    group_ver_res.should.have.key("CreationTimestamp")
-    group_ver_res.should.have.key("Id").equals(group_id)
-    group_ver_res.should.have.key("Version")
+    assert "Arn" in group_ver_res
+    assert "CreationTimestamp" in group_ver_res
+    assert group_ver_res["Id"] == group_id
+    assert "Version" in group_ver_res
 
     if not TEST_SERVER_MODE:
-        group_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert group_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_create_group_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.create_group_version(GroupId="cd2ea6dc-6634-4e89-8441-8003500435f9")
 
-    ex.value.response["Error"]["Message"].should.equal("That group does not exist.")
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That group does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @pytest.mark.parametrize(
@@ -269,7 +247,6 @@ def test_create_group_version_with_invalid_id():
 def test_create_group_version_with_invalid_version_arn(
     def_ver_key_name, arn, error_message
 ):
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_grp_res = client.create_group(Name="TestGroup")
     group_id = create_grp_res["Id"]
@@ -279,50 +256,48 @@ def test_create_group_version_with_invalid_version_arn(
     with pytest.raises(ClientError) as ex:
         client.create_group_version(GroupId=group_id, **definition_versions)
 
-    ex.value.response["Error"]["Message"].should.equal(
-        f"The group is invalid or corrupted. (ErrorDetails: [{error_message}])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"The group is invalid or corrupted. (ErrorDetails: [{error_message}])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_group_versions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_res = client.create_group(Name="TestGroup")
     group_id = create_res["Id"]
 
     group_vers_res = client.list_group_versions(GroupId=group_id)
 
-    group_vers_res.should.have.key("Versions")
+    assert "Versions" in group_vers_res
     group_ver = group_vers_res["Versions"][0]
-    group_ver.should.have.key("Arn")
-    group_ver.should.have.key("CreationTimestamp")
-    group_ver.should.have.key("Id").equals(group_id)
-    group_ver.should.have.key("Version")
+    assert "Arn" in group_ver
+    assert "CreationTimestamp" in group_ver
+    assert group_ver["Id"] == group_id
+    assert "Version" in group_ver
 
     if not TEST_SERVER_MODE:
-        group_ver["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert group_ver["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_list_group_versions_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.list_group_versions(GroupId="7b0bdeae-54c7-47cf-9f93-561e672efd9c")
-    ex.value.response["Error"]["Message"].should.equal(
-        "That group definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That group definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_group_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_core_ver = {
         "Cores": [
@@ -427,19 +402,18 @@ def test_get_group_version():
         GroupId=group_id, GroupVersionId=group_ver_id
     )
 
-    group_ver_res.should.have.key("Arn")
-    group_ver_res.should.have.key("CreationTimestamp")
-    group_ver_res.should.have.key("Definition").should.equal(definition)
-    group_ver_res.should.have.key("Id").equals(group_id)
-    group_ver_res.should.have.key("Version").should.equal(group_ver_id)
+    assert "Arn" in group_ver_res
+    assert "CreationTimestamp" in group_ver_res
+    assert group_ver_res["Definition"] == definition
+    assert group_ver_res["Id"] == group_id
+    assert group_ver_res["Version"] == group_ver_id
 
     if not TEST_SERVER_MODE:
-        group_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert group_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_group_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
@@ -447,15 +421,13 @@ def test_get_group_version_with_invalid_id():
             GroupId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
             GroupVersionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That group definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That group definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_get_group_version_with_invalid_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     create_res = client.create_group(Name="TestGroup")
 
@@ -467,61 +439,58 @@ def test_get_group_version_with_invalid_version_id():
             GroupId=group_id,
             GroupVersionId=invalid_group_ver_id,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {invalid_group_ver_id} of Group Definition {group_id} does not exist."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Version {invalid_group_ver_id} of Group Definition {group_id} does not exist."
     )
-    ex.value.response["Error"]["Code"].should.equal("VersionNotFoundException")
+    assert err["Code"] == "VersionNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_associate_role_to_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     res = client.associate_role_to_group(
         GroupId="abc002c8-1093-485e-9324-3baadf38e582",
         RoleArn=f"arn:aws:iam::{ACCOUNT_ID}:role/greengrass-role",
     )
 
-    res.should.have.key("AssociatedAt")
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "AssociatedAt" in res
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_associated_role():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     group_id = "abc002c8-1093-485e-9324-3baadf38e582"
     role_arn = f"arn:aws:iam::{ACCOUNT_ID}:role/greengrass-role"
     client.associate_role_to_group(GroupId=group_id, RoleArn=role_arn)
 
     res = client.get_associated_role(GroupId=group_id)
-    res.should.have.key("AssociatedAt")
-    res.should.have.key("RoleArn").should.equal(role_arn)
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "AssociatedAt" in res
+    assert res["RoleArn"] == role_arn
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        res["AssociatedAt"].should.equal("2022-06-01T12:00:00.000Z")
+        assert res["AssociatedAt"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_associated_role_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_associated_role(GroupId="abc002c8-1093-485e-9324-3baadf38e582")
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "You need to attach an IAM role to this deployment group."
-    )
-    ex.value.response["Error"]["Code"].should.equal("404")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "You need to attach an IAM role to this deployment group."
+    assert err["Code"] == "404"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_disassociate_role_from_group():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     group_id = "abc002c8-1093-485e-9324-3baadf38e582"
     role_arn = f"arn:aws:iam::{ACCOUNT_ID}:role/greengrass-role"
@@ -529,30 +498,28 @@ def test_disassociate_role_from_group():
     client.get_associated_role(GroupId=group_id)
 
     res = client.disassociate_role_from_group(GroupId=group_id)
-    res.should.have.key("DisassociatedAt")
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "DisassociatedAt" in res
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        res["DisassociatedAt"].should.equal("2022-06-01T12:00:00.000Z")
+        assert res["DisassociatedAt"] == "2022-06-01T12:00:00.000Z"
 
     with pytest.raises(ClientError) as ex:
         client.get_associated_role(GroupId=group_id)
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "You need to attach an IAM role to this deployment group."
-    )
-    ex.value.response["Error"]["Code"].should.equal("404")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "You need to attach an IAM role to this deployment group."
+    assert err["Code"] == "404"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_disassociate_role_from_group_with_none_exists_group_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     group_id = "abc002c8-1093-485e-9324-3baadf38e582"
     res = client.disassociate_role_from_group(GroupId=group_id)
-    res.should.have.key("DisassociatedAt")
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "DisassociatedAt" in res
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        res["DisassociatedAt"].should.equal("2022-06-01T12:00:00.000Z")
+        assert res["DisassociatedAt"] == "2022-06-01T12:00:00.000Z"
diff --git a/tests/test_greengrass/test_greengrass_resource.py b/tests/test_greengrass/test_greengrass_resource.py
index ace36e27e..c31e1b23d 100644
--- a/tests/test_greengrass/test_greengrass_resource.py
+++ b/tests/test_greengrass/test_greengrass_resource.py
@@ -10,7 +10,6 @@ from moto.settings import TEST_SERVER_MODE
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_resource_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Resources": [
@@ -30,21 +29,20 @@ def test_create_resource_definition():
 
     resource_name = "TestResource"
     res = client.create_resource_definition(InitialVersion=init_ver, Name=resource_name)
-    res.should.have.key("Arn")
-    res.should.have.key("Id")
-    res.should.have.key("LatestVersion")
-    res.should.have.key("LatestVersionArn")
-    res.should.have.key("Name").equals(resource_name)
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
+    assert "Arn" in res
+    assert "Id" in res
+    assert "LatestVersion" in res
+    assert "LatestVersionArn" in res
+    assert res["Name"] == resource_name
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 201
 
     if not TEST_SERVER_MODE:
-        res.should.have.key("CreationTimestamp").equals("2022-06-01T12:00:00.000Z")
-        res.should.have.key("LastUpdatedTimestamp").equals("2022-06-01T12:00:00.000Z")
+        assert res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_create_resource_definition_with_invalid_volume_resource():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Resources": [
@@ -64,15 +62,16 @@ def test_create_resource_definition_with_invalid_volume_resource():
 
     with pytest.raises(ClientError) as ex:
         client.create_resource_definition(InitialVersion=init_ver)
-    ex.value.response["Error"]["Message"].should.equal(
-        "The resources definition is invalid. (ErrorDetails: [Accessing /sys is prohibited])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "The resources definition is invalid. (ErrorDetails: [Accessing /sys is prohibited])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @mock_greengrass
 def test_create_resource_definition_with_invalid_local_device_resource():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     source_path = "/foo/bar"
     init_ver = {
@@ -91,18 +90,17 @@ def test_create_resource_definition_with_invalid_local_device_resource():
 
     with pytest.raises(ClientError) as ex:
         client.create_resource_definition(InitialVersion=init_ver)
-    ex.value.response["Error"]["Message"].should.equal(
-        f"The resources definition is invalid. (ErrorDetails: [Device resource path should begin with "
-        "/dev"
-        f", but got: {source_path}])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"The resources definition is invalid. (ErrorDetails: [Device resource path should begin with /dev, but got: {source_path}])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_resource_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_resources = [
         {
@@ -141,18 +139,17 @@ def test_create_resource_definition_version():
     device_def_ver_res = client.create_resource_definition_version(
         ResourceDefinitionId=resource_def_id, Resources=v2_resources
     )
-    device_def_ver_res.should.have.key("Arn")
-    device_def_ver_res.should.have.key("CreationTimestamp")
-    device_def_ver_res.should.have.key("Id").equals(resource_def_id)
-    device_def_ver_res.should.have.key("Version")
+    assert "Arn" in device_def_ver_res
+    assert "CreationTimestamp" in device_def_ver_res
+    assert device_def_ver_res["Id"] == resource_def_id
+    assert "Version" in device_def_ver_res
 
     if not TEST_SERVER_MODE:
-        device_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert device_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_create_resources_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     resources = [
         {
@@ -172,15 +169,13 @@ def test_create_resources_definition_version_with_invalid_id():
             ResourceDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
             Resources=resources,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That resource definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That resource definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_create_resources_definition_version_with_volume_resource():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_resources = [
         {
@@ -219,15 +214,16 @@ def test_create_resources_definition_version_with_volume_resource():
         client.create_resource_definition_version(
             ResourceDefinitionId=resource_def_id, Resources=v2_resources
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "The resources definition is invalid. (ErrorDetails: [Accessing /sys is prohibited])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "The resources definition is invalid. (ErrorDetails: [Accessing /sys is prohibited])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @mock_greengrass
 def test_create_resources_definition_version_with_invalid_local_device_resource():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_resources = [
         {
@@ -261,12 +257,12 @@ def test_create_resources_definition_version_with_invalid_local_device_resource(
         client.create_resource_definition_version(
             ResourceDefinitionId=resource_def_id, Resources=v2_resources
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"The resources definition is invalid. (ErrorDetails: [Device resource path should begin with "
-        "/dev"
-        f", but got: {source_path}])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"The resources definition is invalid. (ErrorDetails: [Device resource path should begin with /dev, but got: {source_path}])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
@@ -299,28 +295,23 @@ def test_list_resources():
     res_ver_arn = create_res["LatestVersionArn"]
 
     res = client.list_resource_definitions()
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
-    res.should.have.key("Definitions")
-    res["Definitions"].should.have.length_of(1)
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
+    assert "Definitions" in res
+    assert len(res["Definitions"]) == 1
     definition = res["Definitions"][0]
-    definition.should.have.key("Id").equals(res_def_id)
-    definition.should.have.key("Arn").equals(res_def_arn)
-    definition.should.have.key("LatestVersion").equals(res_ver)
-    definition.should.have.key("LatestVersionArn").equals(res_ver_arn)
+    assert definition["Id"] == res_def_id
+    assert definition["Arn"] == res_def_arn
+    assert definition["LatestVersion"] == res_ver
+    assert definition["LatestVersionArn"] == res_ver_arn
 
     if not TEST_SERVER_MODE:
-        definition.should.have.key("CreationTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
-        definition.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert definition["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert definition["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_resource_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Resources": [
@@ -349,36 +340,31 @@ def test_get_resource_definition():
 
     get_res = client.get_resource_definition(ResourceDefinitionId=resource_def_id)
 
-    get_res.should.have.key("Name").equals(resource_name)
-    get_res.should.have.key("Arn").equals(arn)
-    get_res.should.have.key("Id").equals(resource_def_id)
-    get_res.should.have.key("LatestVersion").equals(latest_version)
-    get_res.should.have.key("LatestVersionArn").equals(latest_version_arn)
+    assert get_res["Name"] == resource_name
+    assert get_res["Arn"] == arn
+    assert get_res["Id"] == resource_def_id
+    assert get_res["LatestVersion"] == latest_version
+    assert get_res["LatestVersionArn"] == latest_version_arn
 
     if not TEST_SERVER_MODE:
-        get_res.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        get_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert get_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert get_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_resource_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_resource_definition(
             ResourceDefinitionId="76f22a66-176a-4474-b450-04099dc4b069"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That Resource List Definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That Resource List Definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_delete_resource_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Resources": [
@@ -401,27 +387,24 @@ def test_delete_resource_definition():
 
     resource_def_id = create_res["Id"]
     del_res = client.delete_resource_definition(ResourceDefinitionId=resource_def_id)
-    del_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert del_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @mock_greengrass
 def test_delete_resource_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.delete_resource_definition(
             ResourceDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That resources definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That resources definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_update_resource_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Resources": [
@@ -446,15 +429,14 @@ def test_update_resource_definition():
     update_res = client.update_resource_definition(
         ResourceDefinitionId=resource_def_id, Name=updated_resource_name
     )
-    update_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert update_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     get_res = client.get_resource_definition(ResourceDefinitionId=resource_def_id)
-    get_res.should.have.key("Name").equals(updated_resource_name)
+    assert get_res["Name"] == updated_resource_name
 
 
 @mock_greengrass
 def test_update_device_definition_with_empty_name():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Resources": [
@@ -478,29 +460,27 @@ def test_update_device_definition_with_empty_name():
 
     with pytest.raises(ClientError) as ex:
         client.update_resource_definition(ResourceDefinitionId=resource_def_id, Name="")
-    ex.value.response["Error"]["Message"].should.equal("Invalid resource name.")
-    ex.value.response["Error"]["Code"].should.equal("InvalidInputException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "Invalid resource name."
+    assert err["Code"] == "InvalidInputException"
 
 
 @mock_greengrass
 def test_update_resource_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.update_resource_definition(
             ResourceDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6", Name="123"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That resources definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    rr = ex.value.response["Error"]
+    assert rr["Message"] == "That resources definition does not exist."
+    assert rr["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_resource_definition_versions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     resources = [
         {
@@ -524,36 +504,33 @@ def test_list_resource_definition_versions():
         ResourceDefinitionId=resource_def_id
     )
 
-    resource_def_vers_res.should.have.key("Versions")
-    resource_def_vers_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "Versions" in resource_def_vers_res
+    assert resource_def_vers_res["ResponseMetadata"]["HTTPStatusCode"] == 200
     device_def_ver = resource_def_vers_res["Versions"][0]
-    device_def_ver.should.have.key("Arn")
-    device_def_ver.should.have.key("CreationTimestamp")
-    device_def_ver.should.have.key("Id").equals(resource_def_id)
-    device_def_ver.should.have.key("Version")
+    assert "Arn" in device_def_ver
+    assert "CreationTimestamp" in device_def_ver
+    assert device_def_ver["Id"] == resource_def_id
+    assert "Version" in device_def_ver
 
     if not TEST_SERVER_MODE:
-        device_def_ver["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert device_def_ver["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_list_resource_definition_versions_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.list_resource_definition_versions(
             ResourceDefinitionId="fe2392e9-e67f-4308-af1b-ff94a128b231"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That resources definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That resources definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_resource_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     resources = [
         {
@@ -579,37 +556,32 @@ def test_get_resource_definition_version():
         ResourceDefinitionVersionId=resource_def_ver_id,
     )
 
-    resource_def_ver_res.should.have.key("Arn")
-    resource_def_ver_res.should.have.key("CreationTimestamp")
-    resource_def_ver_res.should.have.key("Definition").should.equal(initial_version)
-    resource_def_ver_res.should.have.key("Id").equals(resource_def_id)
-    resource_def_ver_res.should.have.key("Version")
-    resource_def_ver_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert "Arn" in resource_def_ver_res
+    assert "CreationTimestamp" in resource_def_ver_res
+    assert resource_def_ver_res["Definition"] == initial_version
+    assert resource_def_ver_res["Id"] == resource_def_id
+    assert "Version" in resource_def_ver_res
+    assert resource_def_ver_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        resource_def_ver_res["CreationTimestamp"].should.equal(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert resource_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_resource_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_resource_definition_version(
             ResourceDefinitionId="fe2392e9-e67f-4308-af1b-ff94a128b231",
             ResourceDefinitionVersionId="cd2ea6dc-6634-4e89-8441-8003500435f9",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That resources definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That resources definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_get_resource_definition_version_with_invalid_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     resources = [
         {
@@ -635,7 +607,9 @@ def test_get_resource_definition_version_with_invalid_version_id():
             ResourceDefinitionId=resource_def_id,
             ResourceDefinitionVersionId=invalid_resource_version_id,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {invalid_resource_version_id} of Resource List Definition {resource_def_id} does not exist."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Version {invalid_resource_version_id} of Resource List Definition {resource_def_id} does not exist."
     )
-    ex.value.response["Error"]["Code"].should.equal("VersionNotFoundException")
+    assert err["Code"] == "VersionNotFoundException"
diff --git a/tests/test_greengrass/test_greengrass_subscriptions.py b/tests/test_greengrass/test_greengrass_subscriptions.py
index a684a9e50..d7992d2db 100644
--- a/tests/test_greengrass/test_greengrass_subscriptions.py
+++ b/tests/test_greengrass/test_greengrass_subscriptions.py
@@ -19,7 +19,6 @@ from moto.settings import TEST_SERVER_MODE
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_subscription_definition(target):
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -35,21 +34,20 @@ def test_create_subscription_definition(target):
     res = client.create_subscription_definition(
         InitialVersion=init_ver, Name=subscription_name
     )
-    res.should.have.key("Arn")
-    res.should.have.key("Id")
-    res.should.have.key("LatestVersion")
-    res.should.have.key("LatestVersionArn")
-    res.should.have.key("Name").equals(subscription_name)
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(201)
+    assert "Arn" in res
+    assert "Id" in res
+    assert "LatestVersion" in res
+    assert "LatestVersionArn" in res
+    assert res["Name"] == subscription_name
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 201
 
     if not TEST_SERVER_MODE:
-        res.should.have.key("CreationTimestamp").equals("2022-06-01T12:00:00.000Z")
-        res.should.have.key("LastUpdatedTimestamp").equals("2022-06-01T12:00:00.000Z")
+        assert res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_create_subscription_definition_with_invalid_target():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -66,15 +64,16 @@ def test_create_subscription_definition_with_invalid_target():
             InitialVersion=init_ver, Name="TestSubscription"
         )
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription target is invalid. ID is '123456' and Target is 'foo'])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription target is invalid. ID is '123456' and Target is 'foo'])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @mock_greengrass
 def test_create_subscription_definition_with_invalid_source():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -91,16 +90,17 @@ def test_create_subscription_definition_with_invalid_source():
             InitialVersion=init_ver, Name="TestSubscription"
         )
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription source is invalid. ID is '123456' and Source is 'foo'])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription source is invalid. ID is '123456' and Source is 'foo'])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_subscription_definitions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -118,27 +118,22 @@ def test_list_subscription_definitions():
     )
 
     res = client.list_subscription_definitions()
-    res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     subscription_def = res["Definitions"][0]
-    subscription_def.should.have.key("Name").equals(subscription_name)
-    subscription_def.should.have.key("Arn")
-    subscription_def.should.have.key("Id")
-    subscription_def.should.have.key("LatestVersion")
-    subscription_def.should.have.key("LatestVersionArn")
+    assert subscription_def["Name"] == subscription_name
+    assert "Arn" in subscription_def
+    assert "Id" in subscription_def
+    assert "LatestVersion" in subscription_def
+    assert "LatestVersionArn" in subscription_def
     if not TEST_SERVER_MODE:
-        subscription_def.should.have.key("CreationTimestamp").equal(
-            "2022-06-01T12:00:00.000Z"
-        )
-        subscription_def.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert subscription_def["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert subscription_def["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_subscription_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -164,38 +159,33 @@ def test_get_subscription_definition():
         SubscriptionDefinitionId=subscription_def_id
     )
 
-    get_res.should.have.key("Name").equals(subscription_name)
-    get_res.should.have.key("Arn").equals(arn)
-    get_res.should.have.key("Id").equals(subscription_def_id)
-    get_res.should.have.key("LatestVersion").equals(latest_version)
-    get_res.should.have.key("LatestVersionArn").equals(latest_version_arn)
-    get_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert get_res["Name"] == subscription_name
+    assert get_res["Arn"] == arn
+    assert get_res["Id"] == subscription_def_id
+    assert get_res["LatestVersion"] == latest_version
+    assert get_res["LatestVersionArn"] == latest_version_arn
+    assert get_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     if not TEST_SERVER_MODE:
-        get_res.should.have.key("CreationTimestamp").equal("2022-06-01T12:00:00.000Z")
-        get_res.should.have.key("LastUpdatedTimestamp").equals(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert get_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
+        assert get_res["LastUpdatedTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_subscription_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     with pytest.raises(ClientError) as ex:
         client.get_subscription_definition(
             SubscriptionDefinitionId="b552443b-1888-469b-81f8-0ebc5ca92949"
         )
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "That Subscription List Definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That Subscription List Definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_delete_subscription_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -215,12 +205,11 @@ def test_delete_subscription_definition():
     del_res = client.delete_subscription_definition(
         SubscriptionDefinitionId=subscription_def_id
     )
-    del_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert del_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
 
 @mock_greengrass
 def test_update_subscription_definition():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -241,17 +230,16 @@ def test_update_subscription_definition():
     update_res = client.update_subscription_definition(
         SubscriptionDefinitionId=subscription_def_id, Name=updated_subscription_name
     )
-    update_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    assert update_res["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     get_res = client.get_subscription_definition(
         SubscriptionDefinitionId=subscription_def_id
     )
-    get_res.should.have.key("Name").equals(updated_subscription_name)
+    assert get_res["Name"] == updated_subscription_name
 
 
 @mock_greengrass
 def test_update_subscription_definition_with_empty_name():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -272,48 +260,40 @@ def test_update_subscription_definition_with_empty_name():
         client.update_subscription_definition(
             SubscriptionDefinitionId=subscription_def_id, Name=""
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "Input does not contain any attributes to be updated"
-    )
-    ex.value.response["Error"]["Code"].should.equal(
-        "InvalidContainerDefinitionException"
-    )
+    err = ex.value.response["Error"]
+    assert err["Message"] == "Input does not contain any attributes to be updated"
+    assert err["Code"] == "InvalidContainerDefinitionException"
 
 
 @mock_greengrass
 def test_update_subscription_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.update_subscription_definition(
             SubscriptionDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6", Name="123"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That subscriptions definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That subscriptions definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_delete_subscription_definition_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.delete_subscription_definition(
             SubscriptionDefinitionId="6fbffc21-989e-4d29-a793-a42f450a78c6"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That subscriptions definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That subscriptions definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_create_subscription_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_subscriptions = [
         {
@@ -342,20 +322,19 @@ def test_create_subscription_definition_version():
     subscription_def_ver_res = client.create_subscription_definition_version(
         SubscriptionDefinitionId=subscription_def_id, Subscriptions=v2_subscriptions
     )
-    subscription_def_ver_res.should.have.key("Arn")
-    subscription_def_ver_res.should.have.key("CreationTimestamp")
-    subscription_def_ver_res.should.have.key("Id").equals(subscription_def_id)
-    subscription_def_ver_res.should.have.key("Version")
+    assert "Arn" in subscription_def_ver_res
+    assert "CreationTimestamp" in subscription_def_ver_res
+    assert subscription_def_ver_res["Id"] == subscription_def_id
+    assert "Version" in subscription_def_ver_res
 
     if not TEST_SERVER_MODE:
-        subscription_def_ver_res["CreationTimestamp"].should.equal(
-            "2022-06-01T12:00:00.000Z"
+        assert (
+            subscription_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
         )
 
 
 @mock_greengrass
 def test_create_subscription_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     subscriptions = [
         {
@@ -371,15 +350,13 @@ def test_create_subscription_definition_version_with_invalid_id():
             SubscriptionDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
             Subscriptions=subscriptions,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That subscriptions does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That subscriptions does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_create_subscription_definition_version_with_invalid_target():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_subscriptions = [
         {
@@ -410,15 +387,16 @@ def test_create_subscription_definition_version_with_invalid_target():
             SubscriptionDefinitionId=subscription_def_id, Subscriptions=v2_subscriptions
         )
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription target is invalid. ID is '999999' and Target is 'foo'])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription target is invalid. ID is '999999' and Target is 'foo'])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @mock_greengrass
 def test_create_subscription_definition_version_with_invalid_source():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     v1_subscriptions = [
         {
@@ -449,16 +427,17 @@ def test_create_subscription_definition_version_with_invalid_source():
             SubscriptionDefinitionId=subscription_def_id, Subscriptions=v2_subscriptions
         )
 
-    ex.value.response["Error"]["Message"].should.equal(
-        "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription source is invalid. ID is '999999' and Source is 'foo'])"
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == "The subscriptions definition is invalid or corrupted. (ErrorDetails: [Subscription source is invalid. ID is '999999' and Source is 'foo'])"
     )
-    ex.value.response["Error"]["Code"].should.equal("400")
+    assert err["Code"] == "400"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_list_subscription_definition_versions():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -479,39 +458,34 @@ def test_list_subscription_definition_versions():
         SubscriptionDefinitionId=subscription_def_id
     )
 
-    subscription_def_ver_res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
-    subscription_def_ver_res.should.have.key("Versions")
+    assert subscription_def_ver_res["ResponseMetadata"]["HTTPStatusCode"] == 200
+    assert "Versions" in subscription_def_ver_res
     subscription_def_ver = subscription_def_ver_res["Versions"][0]
-    subscription_def_ver.should.have.key("Arn")
-    subscription_def_ver.should.have.key("CreationTimestamp")
-    subscription_def_ver.should.have.key("Id").equals(subscription_def_id)
-    subscription_def_ver.should.have.key("Version")
+    assert "Arn" in subscription_def_ver
+    assert "CreationTimestamp" in subscription_def_ver
+    assert subscription_def_ver["Id"] == subscription_def_id
+    assert "Version" in subscription_def_ver
 
     if not TEST_SERVER_MODE:
-        subscription_def_ver["CreationTimestamp"].should.equal(
-            "2022-06-01T12:00:00.000Z"
-        )
+        assert subscription_def_ver["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_list_subscription_definition_versions_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
         client.list_subscription_definition_versions(
             SubscriptionDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c"
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That subscriptions definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That subscriptions definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @freezegun.freeze_time("2022-06-01 12:00:00")
 @mock_greengrass
 def test_get_subscription_definition_version():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -535,19 +509,18 @@ def test_get_subscription_definition_version():
         SubscriptionDefinitionVersionId=subscription_def_ver_id,
     )
 
-    func_def_ver_res.should.have.key("Arn")
-    func_def_ver_res.should.have.key("CreationTimestamp")
-    func_def_ver_res.should.have.key("Definition").should.equal(init_ver)
-    func_def_ver_res.should.have.key("Id").equals(subscription_def_id)
-    func_def_ver_res.should.have.key("Version")
+    assert "Arn" in func_def_ver_res
+    assert "CreationTimestamp" in func_def_ver_res
+    assert func_def_ver_res["Definition"] == init_ver
+    assert func_def_ver_res["Id"] == subscription_def_id
+    assert "Version" in func_def_ver_res
 
     if not TEST_SERVER_MODE:
-        func_def_ver_res["CreationTimestamp"].should.equal("2022-06-01T12:00:00.000Z")
+        assert func_def_ver_res["CreationTimestamp"] == "2022-06-01T12:00:00.000Z"
 
 
 @mock_greengrass
 def test_get_subscription_definition_version_with_invalid_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
 
     with pytest.raises(ClientError) as ex:
@@ -555,15 +528,13 @@ def test_get_subscription_definition_version_with_invalid_id():
             SubscriptionDefinitionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
             SubscriptionDefinitionVersionId="7b0bdeae-54c7-47cf-9f93-561e672efd9c",
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        "That subscriptions definition does not exist."
-    )
-    ex.value.response["Error"]["Code"].should.equal("IdNotFoundException")
+    err = ex.value.response["Error"]
+    assert err["Message"] == "That subscriptions definition does not exist."
+    assert err["Code"] == "IdNotFoundException"
 
 
 @mock_greengrass
 def test_get_subscription_definition_version_with_invalid_version_id():
-
     client = boto3.client("greengrass", region_name="ap-northeast-1")
     init_ver = {
         "Subscriptions": [
@@ -587,7 +558,9 @@ def test_get_subscription_definition_version_with_invalid_version_id():
             SubscriptionDefinitionId=subscription_def_id,
             SubscriptionDefinitionVersionId=invalid_subscription_def_ver_id,
         )
-    ex.value.response["Error"]["Message"].should.equal(
-        f"Version {invalid_subscription_def_ver_id} of Subscription List Definition {subscription_def_id} does not exist."
+    err = ex.value.response["Error"]
+    assert (
+        err["Message"]
+        == f"Version {invalid_subscription_def_ver_id} of Subscription List Definition {subscription_def_id} does not exist."
     )
-    ex.value.response["Error"]["Code"].should.equal("VersionNotFoundException")
+    assert err["Code"] == "VersionNotFoundException"
diff --git a/tests/test_iam/test_iam.py b/tests/test_iam/test_iam.py
index a73c40064..3d98cf53b 100644
--- a/tests/test_iam/test_iam.py
+++ b/tests/test_iam/test_iam.py
@@ -2063,6 +2063,16 @@ def test_attach_detach_user_policy():
         Description="my user attached policy",
     )
 
+    # try a non-existent policy
+    non_existent_policy_arn = f"arn:aws:iam::{ACCOUNT_ID}:policy/not-existent"
+    with pytest.raises(ClientError) as exc:
+        client.attach_user_policy(UserName=user.name, PolicyArn=non_existent_policy_arn)
+    err = exc.value.response["Error"]
+    err["Code"].should.equal("NoSuchEntity")
+    err["Message"].should.equal(
+        f"Policy {non_existent_policy_arn} does not exist or is not attachable."
+    )
+
     client.attach_user_policy(UserName=user.name, PolicyArn=policy.arn)
 
     resp = client.list_attached_user_policies(UserName=user.name)
@@ -2077,6 +2087,45 @@ def test_attach_detach_user_policy():
     resp["AttachedPolicies"].should.have.length_of(0)
 
 
+@mock_iam()
+def test_attach_detach_role_policy():
+    iam = boto3.resource("iam", region_name="us-east-1")
+    client = boto3.client("iam", region_name="us-east-1")
+
+    role = iam.create_role(RoleName="test-role", AssumeRolePolicyDocument="{}")
+
+    policy_name = "RoleAttachedPolicy"
+    policy = iam.create_policy(
+        PolicyName=policy_name,
+        PolicyDocument=MOCK_POLICY,
+        Path="/mypolicy/",
+        Description="my role attached policy",
+    )
+
+    # try a non-existent policy
+    non_existent_policy_arn = f"arn:aws:iam::{ACCOUNT_ID}:policy/not-existent"
+    with pytest.raises(ClientError) as exc:
+        client.attach_role_policy(RoleName=role.name, PolicyArn=non_existent_policy_arn)
+    err = exc.value.response["Error"]
+    err["Code"].should.equal("NoSuchEntity")
+    err["Message"].should.equal(
+        f"Policy {non_existent_policy_arn} does not exist or is not attachable."
+    )
+
+    client.attach_role_policy(RoleName=role.name, PolicyArn=policy.arn)
+
+    resp = client.list_attached_role_policies(RoleName=role.name)
+    resp["AttachedPolicies"].should.have.length_of(1)
+    attached_policy = resp["AttachedPolicies"][0]
+    attached_policy["PolicyArn"].should.equal(policy.arn)
+    attached_policy["PolicyName"].should.equal(policy_name)
+
+    client.detach_role_policy(RoleName=role.name, PolicyArn=policy.arn)
+
+    resp = client.list_attached_role_policies(RoleName=role.name)
+    resp["AttachedPolicies"].should.have.length_of(0)
+
+
 @mock_iam()
 def test_only_detach_user_policy():
     iam = boto3.resource("iam", region_name="us-east-1")
diff --git a/tests/test_route53/test_route53.py b/tests/test_route53/test_route53.py
index 03fc53161..67538b09b 100644
--- a/tests/test_route53/test_route53.py
+++ b/tests/test_route53/test_route53.py
@@ -5,8 +5,9 @@ import sure  # noqa # pylint: disable=unused-import
 
 import botocore
 import pytest
+import requests
 
-from moto import mock_ec2, mock_route53
+from moto import mock_ec2, mock_route53, settings
 
 
 @mock_route53
@@ -28,6 +29,10 @@ def test_create_hosted_zone():
     delegation["NameServers"].should.contain("ns-2050.awsdns-66.org")
     delegation["NameServers"].should.contain("ns-2051.awsdns-67.co.uk")
 
+    location = response["Location"]
+    if not settings.TEST_SERVER_MODE:
+        assert "<Name>testdns.aws.com.</Name>" in requests.get(location).text
+
 
 @mock_route53
 def test_list_hosted_zones():
@@ -481,7 +486,6 @@ def test_list_or_change_tags_for_resource_request():
 @mock_ec2
 @mock_route53
 def test_list_hosted_zones_by_name():
-
     # Create mock VPC so we can get a VPC ID
     ec2c = boto3.client("ec2", region_name="us-east-1")
     vpc_id = ec2c.create_vpc(CidrBlock="10.1.0.0/16").get("Vpc").get("VpcId")
diff --git a/tests/test_ssm/test_ssm_boto3.py b/tests/test_ssm/test_ssm_boto3.py
index 29aa73ade..9a97573bf 100644
--- a/tests/test_ssm/test_ssm_boto3.py
+++ b/tests/test_ssm/test_ssm_boto3.py
@@ -448,6 +448,9 @@ def test_put_parameter_no_type():
         == "A parameter type is required when you create a parameter."
     )
 
+    # Ensure backend state is consistent
+    assert client.describe_parameters()
+
 
 @mock_ssm
 def test_update_parameter():