Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zawan-ila committed Jun 6, 2024
1 parent 8714cc1 commit 3f8337a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions course_discovery/apps/api/tests/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2347,6 +2347,8 @@ def test_detail_fields_in_response(self, is_post_request):
'staff': MinimalPersonSerializer(course_run.staff, many=True,
context={'request': request}).data,
'content_language': course_run.language.code if course_run.language else None,
'restriction_type': course_run.restricted_run.restriction_type if hasattr(course_run, 'restricted_run') else None


}],
'uuid': str(course.uuid),
Expand Down Expand Up @@ -2418,6 +2420,7 @@ def get_expected_data(cls, course, course_run, course_skill, seat):
'estimated_hours': get_course_run_estimated_hours(course_run),
'first_enrollable_paid_seat_price': course_run.first_enrollable_paid_seat_price or 0.0,
'is_enrollable': course_run.is_enrollable,
'restriction_type': course_run.restricted_run.restriction_type if hasattr(course_run, 'restricted_run') else None
}],
'uuid': str(course.uuid),
'subjects': [subject.name for subject in course.subjects.all()],
Expand Down Expand Up @@ -2549,6 +2552,8 @@ def get_expected_data(cls, course_run, course_skill, request):
'first_enrollable_paid_seat_sku': course_run.first_enrollable_paid_seat_sku(),
'first_enrollable_paid_seat_price': course_run.first_enrollable_paid_seat_price,
'is_enrollable': course_run.is_enrollable,
'restriction_type': course_run.restricted_run.restriction_type if hasattr(course_run, 'restricted_run') else None,

}


Expand Down

0 comments on commit 3f8337a

Please sign in to comment.