Skip to content

Commit

Permalink
feat: removing the from the retirement pipeline (#35215)
Browse files Browse the repository at this point in the history
although the demographics IDA has not been entirely deprecated as yet,
it is about to be, so removing from the retirement pipeline.
  • Loading branch information
deborahgu authored Aug 1, 2024
1 parent 20f7dbd commit a7f6cf1
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 162 deletions.
42 changes: 1 addition & 41 deletions scripts/user_retirement/tests/utils/test_edx_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
FAKE_USERNAMES,
TEST_RETIREMENT_QUEUE_STATES,
TEST_RETIREMENT_STATE,
get_fake_user_retirement
get_fake_user_retirement,
)
from scripts.user_retirement.utils import edx_api

Expand Down Expand Up @@ -499,46 +499,6 @@ def test_replace_usernames(self, mock_method):
)


class TestDemographicsApi(OAuth2Mixin, unittest.TestCase):
"""
Test the edX Demographics API client.
"""

@responses.activate(registry=OrderedRegistry)
def setUp(self):
super().setUp()
self.mock_access_token_response()
self.lms_base_url = 'http://localhost:18000/'
self.demographics_base_url = 'http://localhost:18360/'
self.demographics_api = edx_api.DemographicsApi(
self.lms_base_url,
self.demographics_base_url,
'the_client_id',
'the_client_secret'
)

def tearDown(self):
super().tearDown()
responses.reset()

@patch.object(edx_api.DemographicsApi, 'retire_learner')
def test_retire_learner(self, mock_method):
json_data = {
'lms_user_id': get_fake_user_retirement()['user']['id']
}
responses.add(
POST,
urljoin(self.demographics_base_url, 'demographics/api/v1/retire_demographics/'),
match=[matchers.json_params_matcher(json_data)]
)
self.demographics_api.retire_learner(
learner=get_fake_user_retirement()
)
mock_method.assert_called_once_with(
learner=get_fake_user_retirement()
)


class TestLicenseManagerApi(OAuth2Mixin, unittest.TestCase):
"""
Test the edX License Manager API client.
Expand Down
Loading

0 comments on commit a7f6cf1

Please sign in to comment.