-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
There was a problem hiding this 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.
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') |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! Will be merged in along with this work: https://github.com/edx/commerce-coordinator/pull/247/files#diff-d76063092b846765b0a4c6b15b4a31f3c0bad316aa7e39242bf7d9fcd422a088R19
self.commerce_coordinator_api.retire_learner( | ||
learner=get_fake_user_retirement() | ||
) | ||
mock_method.assert_called_once_with( | ||
learner=get_fake_user_retirement() | ||
) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
Adding caller function for new Commerce Coordinator retirement step.