Skip to content

Commit

Permalink
chore: test fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Aug 12, 2024
1 parent 46b091d commit edc19bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions course_discovery/apps/api/tests/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ def test_detail_fields_in_response(self, is_post_request):
'restriction_type': (
course_run.restricted_run.restriction_type if hasattr(course_run, 'restricted_run') else None
),
'fixed_price_usd': course_run.fixed_price_usd,
'fixed_price_usd': float(course_run.fixed_price_usd),
}],
'uuid': str(course.uuid),
'subjects': [subject.name for subject in course.subjects.all()],
Expand Down Expand Up @@ -2426,7 +2426,7 @@ def get_expected_data(cls, course, course_run, course_skill, seat):
'restriction_type': (
course_run.restricted_run.restriction_type if hasattr(course_run, 'restricted_run') else None
),
'fixed_price_usd': course_run.fixed_price_usd,
'fixed_price_usd': float(course_run.fixed_price_usd),
}],
'uuid': str(course.uuid),
'subjects': [subject.name for subject in course.subjects.all()],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def course_run_detail(self, request, detail_fields, course_run):
'restriction_type': (
course_run.restricted_run.restriction_type if hasattr(course_run, 'restricted_run') else None
),
'fixed_price_usd': course_run.fixed_price_usd,
'fixed_price_usd': float(course_run.fixed_price_usd) if course_run.fixed_price_usd else None,
}
if detail_fields:
course_run_detail.update(
Expand Down

0 comments on commit edc19bc

Please sign in to comment.