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

feat: Commerce Coordinator step in retirement pipeline #11

Closed
wants to merge 3 commits into from

Conversation

JadeyOlivier
Copy link
Member

Adding caller function for new Commerce Coordinator retirement step.

Copy link
Member

@grmartin grmartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know if im the best one to approve this, but the tests pass so. lets go for it.

@JadeyOlivier JadeyOlivier requested a review from pwnage101 July 22, 2024 13:00
Passes the learner's LMS User Id instead of username.
"""
data = {'edx_lms_user_id': learner['user']['id']}
api_url = self.get_api_url('lms/user_retirement')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you plan to add the lms/user_retirement endpoint to the commerce-coordinator service? It currently doesn't seem to exist in the django urls.py routes: https://github.com/edx/commerce-coordinator/blob/main/commerce_coordinator/apps/lms/urls.py

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +591 to +596
self.commerce_coordinator_api.retire_learner(
learner=get_fake_user_retirement()
)
mock_method.assert_called_once_with(
learner=get_fake_user_retirement()
)
Copy link
Member

@pwnage101 pwnage101 Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you just copy+pasted this from other tests, but LOL this is quite a thin test that doesn't actually run the retire_learner function. I'm not going to block on this, but if you feel motivated---I think we'd ideally mock the underlying self._requests call.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay cool, I will make a note to create the new test once we've gotten this work through. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants