Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump moto from 4.2.13 to 5.0.25 #722

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions lambda/tests/test_new_account_iam_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
import boto3
import botocore.exceptions
import pytest
from moto import mock_iam
from moto import mock_sts
from moto import mock_organizations
from moto import mock_aws
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID

import new_account_iam_role as lambda_func
Expand Down Expand Up @@ -53,7 +51,7 @@ def aws_credentials(tmpdir, monkeypatch):

In addition to using the aws_credentials fixture, the test functions
must also use a mocked client. For this test file, that would be the
test fixture "iam_client", which invokes "mock_iam()" or "sts_client".
test fixture "iam_client", which invokes "mock_aws()" or "sts_client".
"""
# Create a temporary AWS credentials file for calls to boto.Session().
aws_creds = [
Expand All @@ -77,21 +75,21 @@ def aws_credentials(tmpdir, monkeypatch):
@pytest.fixture(scope="function")
def iam_client(aws_credentials):
"""Yield a mock IAM client that will not affect a real AWS account."""
with mock_iam():
with mock_aws(config={"iam": {"load_aws_managed_policies": True}}):
yield boto3.client("iam", region_name=AWS_REGION)


@pytest.fixture(scope="function")
def sts_client(aws_credentials):
"""Yield a mock STS client that will not affect a real AWS account."""
with mock_sts():
with mock_aws(config={"iam": {"load_aws_managed_policies": True}}):
yield boto3.client("sts", region_name=AWS_REGION)


@pytest.fixture(scope="function")
def org_client(aws_credentials):
"""Yield a mock organization that will not affect a real AWS account."""
with mock_organizations():
with mock_aws(config={"iam": {"load_aws_managed_policies": True}}):
yield boto3.client("organizations", region_name=AWS_REGION)


Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
moto==4.2.13
moto==5.0.25
-r ./requirements_common.txt
Loading