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: create course home api DRF (#33173) (#33204) #22

Merged
merged 3 commits into from
May 14, 2024

Conversation

andrey-canon
Copy link
Collaborator

@andrey-canon andrey-canon commented May 3, 2024

Description

This is a backport of openedx#33173
There are two extra commits

  1. Parse ordered dict to json format This allows to compare the response with the expected data
  2. This is taken from [OldMongo FC-0004] Remove support for children in Old Mongo  openedx/edx-platform#31134 and basically allows to create a course with the new structure instead of the default old mongo structure

How to test

  1. Go to /api/contentstore/v1/course_rerun/<course-id>
  2. Go to /api/contentstore/v1/home
  3. Go to the studio main page

@andrey-canon andrey-canon force-pushed the and/backport_home_api branch 7 times, most recently from 75c8900 to 342b469 Compare May 7, 2024 18:04
Copy link
Collaborator

@johanseto johanseto left a comment

Choose a reason for hiding this comment

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

Is working the apis, and studio.
2024-05-08_16-10
2024-05-08_16-08

@@ -18,6 +19,7 @@ class HomePageViewTest(CourseTestCase):
"""
Tests for HomePageView.
"""
MODULESTORE = TEST_DATA_SPLIT_MODULESTORE
Copy link
Collaborator

Choose a reason for hiding this comment

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

This add new modulestore, the next commit add the import xD

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My mistake I made a interactive rebase a this line was moved from the other commit

@@ -65,7 +67,7 @@ def test_home_page_response(self):
}

self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertDictEqual(expected_response, response.data)
self.assertDictEqual(expected_response, json.loads(json.dumps(response.data)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting, I think the response.data is in disorder so the json manipulation order it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nop, the problem was that literally in palm appears an OrderedDict so that raises an error because a dict is dict different from an orderedDict

image

@andrey-canon andrey-canon changed the base branch from and/backport_tagging to open-release/palm.nelp May 9, 2024 23:23
@andrey-canon andrey-canon merged commit b22a2b8 into open-release/palm.nelp May 14, 2024
40 checks passed
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