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

Update moto requirement from <5,>=4.0 to >=4.0,<6 #580

Merged
merged 3 commits into from
Mar 17, 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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
'pytest-cov>=4,<5',
'toml==0.10.2',
'yamllint==1.35.1',
'moto>=4.0,<5',
'moto>=4.0,<6',
'fastapi==0.110.0',
'pydantic==2.5.3',
'uvicorn==0.28.0',
Expand Down
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import boto3
import pytest
from moto import mock_s3
from moto import mock_aws

from tests.common.utils import compressed_local_remote_dir # pyright: ignore
from tests.common.utils import get_free_tcp_port # pyright: ignore
Expand Down Expand Up @@ -53,7 +53,7 @@ def aws_credentials():

@pytest.fixture()
def s3_client(aws_credentials: Any):
with mock_s3():
with mock_aws():
conn = boto3.client('s3', region_name='us-east-1')
yield conn

Expand Down Expand Up @@ -108,7 +108,7 @@ def gcs_hmac_client(gcs_hmac_credentials: Any):
# Have to inline this, as the URL-param is not available as a context decorator
with patch.dict(os.environ, {'MOTO_S3_CUSTOM_ENDPOINTS': GCS_URL}):
# Mock needs to be started after the environment variable is patched in
with mock_s3():
with mock_aws():
conn = boto3.client(
's3',
region_name='us-east-1',
Expand Down Expand Up @@ -152,7 +152,7 @@ def r2_client(r2_credentials: Any):
# Have to inline this, as the URL-param is not available as a context decorator
with patch.dict(os.environ, {'MOTO_S3_CUSTOM_ENDPOINTS': R2_URL}):
# Mock needs to be started after the environment variable is patched in
with mock_s3():
with mock_aws():
conn = boto3.client('s3', region_name='us-east-1', endpoint_url=R2_URL)
yield conn

Expand Down
Loading