Skip to content

Conversation

@mariajgrimaldi
Copy link
Contributor

@mariajgrimaldi mariajgrimaldi commented Oct 28, 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

These changes were 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>

Other information

This PR improves tests by adding missing data. Won't be needed after maple.

@mariajgrimaldi mariajgrimaldi force-pushed the li/ednx/JU-6 branch 2 times, most recently from 405dc0e to ec206aa Compare November 2, 2021 13:58
@mariajgrimaldi mariajgrimaldi changed the title Li/ednx/ju 6 JU-6: refactor tests to avoid events failure Nov 2, 2021
@mariajgrimaldi mariajgrimaldi force-pushed the li/ednx/JU-6 branch 2 times, most recently from dd7f343 to 4abfc60 Compare November 3, 2021 22:08
…tent profile errors

fix failing tests due to current date

fix tests
@mariajgrimaldi mariajgrimaldi merged commit fcfc0ad into edunext/limonero.master Nov 4, 2021
Ian2012 pushed a commit that referenced this pull request Oct 3, 2024
reverts changes from #566

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
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