Skip to content

Commit

Permalink
Support moto 5.0
Browse files Browse the repository at this point in the history
moto 5.0 has been released, and the major change is to pull all of the
mocking into one function. Use the new mock_aws function.
  • Loading branch information
s-t-e-v-e-n-k committed Feb 13, 2024
1 parent 241a38f commit b261ae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
dependencies = ["attrs>=17.4.0", "importlib_metadata; python_version<'3.8'"]

[project.optional-dependencies]
tests = ["pytest", "moto<4.2.1"]
tests = ["pytest", "moto"]
aws = ["boto3"]
docs = [
"environ-config[aws]",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_secrets_awssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import boto3
import pytest

from moto import mock_secretsmanager
from moto import mock_aws

import environ

Expand Down Expand Up @@ -62,7 +62,7 @@ def _mock_aws_credentials(force_region):

@pytest.fixture(name="secretsmanager")
def _secretsmanager():
with mock_secretsmanager():
with mock_aws():
yield boto3.client("secretsmanager", region_name="us-east-2")


Expand Down Expand Up @@ -122,7 +122,7 @@ def test_secret_works_with_default_client_overridden(
class Cfg:
pw = sm.secret()

with mock_secretsmanager():
with mock_aws():
# we need to make sure we're using the same region. It doesn't
# matter which -- moto _and_ boto will try figure it out from the
# environment -- but it has to be the same.
Expand Down

0 comments on commit b261ae5

Please sign in to comment.