Skip to content

Commit

Permalink
feat: Add course price in mobile enrollment api (#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 Feb 19, 2024
1 parent b6366b6 commit 79d692d
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 79d692d

Please sign in to comment.