Skip to content

Conversation

@mariajgrimaldi
Copy link
Member

@mariajgrimaldi mariajgrimaldi commented Aug 23, 2021

Description

This PR replaces User.objects.create_user references with UserProfile.create, to automatically create the user's profile avoiding tests errors.

Supporting information

This was discussed -here- after we encountered some errors while using the user's profile in some tests. For example here:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-pr/33620/#showFailuresLink
More in detail:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-pr/33620/testReport/junit/lms.djangoapps.course_goals.tests.test_goals/TestCourseGoalsAPI/Run_Tests___lms_unit___test_add_goal/

Testing instructions

Run edxapp tests:

  1. Run specific tests:
    pytest lms/djangoapps/course_goals/tests/test_goals.py::TestCourseGoalsAPI::test_add_goal
  2. Run specific test suit: paver test_js_run -s <lms|cms>

Deadline

"None"

Other information

This PR just improves tests by adding missing data.

@openedx-webhooks
Copy link

openedx-webhooks commented Aug 23, 2021

Thanks for the pull request, @mariajgrimaldi! I've created OSPR-5984 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Aug 23, 2021
@mariajgrimaldi mariajgrimaldi changed the title refactor: changed create_user with UserFactory to avoid non-existent … [WIP] refactor: changed create_user with UserFactory to avoid errors Aug 23, 2021
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@mariajgrimaldi mariajgrimaldi changed the title [WIP] refactor: changed create_user with UserFactory to avoid errors refactor: changed create_user with UserFactory to avoid errors Aug 24, 2021
@mariajgrimaldi mariajgrimaldi marked this pull request as ready for review August 24, 2021 20:36
@mariajgrimaldi mariajgrimaldi requested a review from a team August 24, 2021 20:36
@openedx-webhooks openedx-webhooks added needs triage and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Aug 24, 2021
@mariajgrimaldi
Copy link
Member Author

Hey @felipemontoya, I hope you're doing great!

As a core committer, what do you think about these improvements? Any feedback is welcome.

@felipemontoya felipemontoya self-assigned this Aug 24, 2021
Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

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

This looks great. Overall it improves the test quality, removes some warnings left from the lint amnesty and it will fix the errors we have on the events PR.

@felipemontoya
Copy link
Member

Since this PR is maintenance only, I believe it is ok to merge it with only one CC approval.

@felipemontoya felipemontoya merged commit 8304e4f into openedx:master Aug 24, 2021
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@natabene
Copy link
Contributor

natabene commented Sep 1, 2021

@mariajgrimaldi @felipemontoya Thank you both!

@openedx-webhooks
Copy link

@mariajgrimaldi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged open-source-contribution PR author is not from Axim or 2U

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants