Skip to content

Commit

Permalink
feat: Add course price in mobile enrollment api (openedx#34255)
Browse files Browse the repository at this point in the history
* feat: Add course price in mobile enrollment api
  • Loading branch information
jawad-khan authored and OmarIthawi committed Jun 4, 2024
1 parent 79756e8 commit 37b7549
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lms/djangoapps/mobile_api/users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,4 @@ class ModeSerializer(serializers.Serializer): # pylint: disable=abstract-method
sku = serializers.CharField()
android_sku = serializers.CharField()
ios_sku = serializers.CharField()
min_price = serializers.IntegerField()
6 changes: 6 additions & 0 deletions lms/djangoapps/mobile_api/users/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ def _assert_enrollment_results(self, api_version, courses, num_courses_returned,
assert 'audit_access_expires' not in courses[0]
else:
assert 'audit_access_expires' in courses[0]

for course_mode in courses[0]['course_modes']:
assert 'android_sku' in course_mode
assert 'ios_sku' in course_mode
assert 'min_price' in course_mode

if gating_enabled:
assert courses[0].get('audit_access_expires') is not None

Expand Down

0 comments on commit 37b7549

Please sign in to comment.