-
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: profile api save extrainfo arabic fields #194
Conversation
fix C901 'update_user_data' is too complex (11)
@override_settings( | ||
ENABLE_OTP_VALIDATION=False, | ||
REQUIRED_USER_EXTRA_INFO_FIELDS=["arabic_first_name", "arabic_last_name"], | ||
PEARSON_RTI_ACTIVATE_GRADED_GATE=True, |
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.
IMO we could remove this since the test purpose is to check if the extrainfo records was updated instead of checking if the CCD was called
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.
The profile API does the same, but I think that the cdd_task could also be verified.
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.
eox-nelp/eox_nelp/user_profile/api/v1/tests/test_views.py
Lines 148 to 161 in 197409a
PEARSON_RTI_ACTIVATE_GRADED_GATE=True, | |
) | |
@patch("eox_nelp.user_profile.api.v1.views.cdd_task") | |
def test_update_extra_info_fields(self, cdd_task_mock): | |
""" | |
Test that extra account user fields has been set. | |
Expected behavior: | |
- Check the response says that the field has been updated. | |
- Status code 200. | |
- Check that update_account_settings method has called once. | |
- Check that user first_name has been updated. | |
- Check that user last_name has been updated. | |
- Check cdd_task async task is called with user.id |
Co-authored-by: Andrey Cañon <[email protected]>
Description
Add extrainfo change capability with user profile data.
Testing instructions
Use post to
{lms_domain}/eox-nelp/api/user-profile/v1/update-user-data/
and update extrainfo dataAfter
Screencast.from.10-07-24.17.13.25.webm
Additional information
Include anything else that will help reviewers and consumers understand the change.
Checklist for Merge