chore: remove moto version constraint after verifying compatibility
This commit is contained in:
@@ -97,11 +97,6 @@ libsass==0.10.0
|
||||
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35271
|
||||
markdown<3.4.0
|
||||
|
||||
# Date: 2024-04-24
|
||||
# moto==5.0 contains breaking changes. Needs to be updated separately.
|
||||
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35270
|
||||
moto<5.0
|
||||
|
||||
# Date: 2024-07-16
|
||||
# We need to upgrade the version of elasticsearch to atleast 7.15 before we can upgrade to Numpy 2.0.0
|
||||
# Otherwise we see a failure while running the following command:
|
||||
|
||||
@@ -130,7 +130,7 @@ more-itertools==10.6.0
|
||||
# via
|
||||
# -r scripts/user_retirement/requirements/base.txt
|
||||
# simple-salesforce
|
||||
moto==4.2.14
|
||||
moto==5.1.4
|
||||
# via -r scripts/user_retirement/requirements/testing.in
|
||||
newrelic==10.9.0
|
||||
# via
|
||||
|
||||
@@ -10,7 +10,7 @@ import boto3
|
||||
import pytest
|
||||
from botocore.exceptions import ClientError
|
||||
from click.testing import CliRunner
|
||||
from moto import mock_ec2, mock_s3
|
||||
from moto import mock_aws
|
||||
|
||||
from scripts.user_retirement.retirement_archive_and_cleanup import (
|
||||
ERR_ARCHIVING,
|
||||
@@ -89,7 +89,7 @@ def fake_learners_to_retire():
|
||||
get_learners_by_date_and_status=DEFAULT,
|
||||
bulk_cleanup_retirements=DEFAULT
|
||||
)
|
||||
@mock_s3
|
||||
@mock_aws
|
||||
def test_successful(*args, **kwargs):
|
||||
conn = boto3.resource('s3')
|
||||
conn.create_bucket(Bucket=FAKE_BUCKET_NAME)
|
||||
@@ -118,8 +118,7 @@ def test_successful(*args, **kwargs):
|
||||
get_learners_by_date_and_status=DEFAULT,
|
||||
bulk_cleanup_retirements=DEFAULT
|
||||
)
|
||||
@mock_ec2
|
||||
@mock_s3
|
||||
@mock_aws
|
||||
def test_successful_with_batching(*args, **kwargs):
|
||||
conn = boto3.resource('s3')
|
||||
conn.create_bucket(Bucket=FAKE_BUCKET_NAME)
|
||||
@@ -149,7 +148,7 @@ def test_successful_with_batching(*args, **kwargs):
|
||||
get_learners_by_date_and_status=DEFAULT,
|
||||
bulk_cleanup_retirements=DEFAULT
|
||||
)
|
||||
@mock_s3
|
||||
@mock_aws
|
||||
def test_successful_dry_run(*args, **kwargs):
|
||||
mock_get_access_token = args[0]
|
||||
mock_get_learners = kwargs['get_learners_by_date_and_status']
|
||||
@@ -253,7 +252,7 @@ def test_conflicting_cool_off_date(*_):
|
||||
assert 'End date cannot occur within the cool_off_days period' in result.output
|
||||
|
||||
|
||||
@mock_s3
|
||||
@mock_aws
|
||||
def test_s3_upload_data():
|
||||
"""
|
||||
Test case to verify s3 upload and download.
|
||||
|
||||
Reference in New Issue
Block a user