Skip to content

Commit 0d20b49

Browse files
authored
Merge pull request #36657 from wgu-ram-chandra/issue-35270-unpin-moto
chore: remove moto version constraint after verifying compatibility
2 parents 704dd73 + 456bc55 commit 0d20b49

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

requirements/constraints.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ libsass==0.10.0
9797
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35271
9898
markdown<3.4.0
9999

100-
# Date: 2024-04-24
101-
# moto==5.0 contains breaking changes. Needs to be updated separately.
102-
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35270
103-
moto<5.0
104-
105100
# Date: 2024-07-16
106101
# We need to upgrade the version of elasticsearch to atleast 7.15 before we can upgrade to Numpy 2.0.0
107102
# Otherwise we see a failure while running the following command:

scripts/user_retirement/requirements/testing.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-r base.txt
22

3-
moto<5.0 # moto==5.0 contains breaking changes. needs to be fixed separately.
3+
moto
44
pytest
55
requests_mock
66
responses

scripts/user_retirement/requirements/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ more-itertools==10.6.0
130130
# via
131131
# -r scripts/user_retirement/requirements/base.txt
132132
# simple-salesforce
133-
moto==4.2.14
133+
moto==5.1.4
134134
# via -r scripts/user_retirement/requirements/testing.in
135135
newrelic==10.9.0
136136
# via

scripts/user_retirement/tests/test_retirement_archive_and_cleanup.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import pytest
1111
from botocore.exceptions import ClientError
1212
from click.testing import CliRunner
13-
from moto import mock_ec2, mock_s3
13+
from moto import mock_aws
1414

1515
from scripts.user_retirement.retirement_archive_and_cleanup import (
1616
ERR_ARCHIVING,
@@ -89,7 +89,7 @@ def fake_learners_to_retire():
8989
get_learners_by_date_and_status=DEFAULT,
9090
bulk_cleanup_retirements=DEFAULT
9191
)
92-
@mock_s3
92+
@mock_aws
9393
def test_successful(*args, **kwargs):
9494
conn = boto3.resource('s3')
9595
conn.create_bucket(Bucket=FAKE_BUCKET_NAME)
@@ -118,8 +118,7 @@ def test_successful(*args, **kwargs):
118118
get_learners_by_date_and_status=DEFAULT,
119119
bulk_cleanup_retirements=DEFAULT
120120
)
121-
@mock_ec2
122-
@mock_s3
121+
@mock_aws
123122
def test_successful_with_batching(*args, **kwargs):
124123
conn = boto3.resource('s3')
125124
conn.create_bucket(Bucket=FAKE_BUCKET_NAME)
@@ -149,7 +148,7 @@ def test_successful_with_batching(*args, **kwargs):
149148
get_learners_by_date_and_status=DEFAULT,
150149
bulk_cleanup_retirements=DEFAULT
151150
)
152-
@mock_s3
151+
@mock_aws
153152
def test_successful_dry_run(*args, **kwargs):
154153
mock_get_access_token = args[0]
155154
mock_get_learners = kwargs['get_learners_by_date_and_status']
@@ -253,7 +252,7 @@ def test_conflicting_cool_off_date(*_):
253252
assert 'End date cannot occur within the cool_off_days period' in result.output
254253

255254

256-
@mock_s3
255+
@mock_aws
257256
def test_s3_upload_data():
258257
"""
259258
Test case to verify s3 upload and download.

0 commit comments

Comments
 (0)