Skip to content

Commit

Permalink
fix dates on in_progress_course (#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniWhitman authored May 21, 2024
1 parent 5c54dfe commit d09c972
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cms/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ def test_create_featured_items():
live=True,
in_progress=True,
)
in_progress_course.enrollment_start = further_past_date
in_progress_course.start_date = past_date
in_progress_course.enrollment_end = future_date
in_progress_course.end_date = further_future_date

unenrollable_course = CourseFactory.create(page=None, live=False)
CoursePageFactory.create(course=unenrollable_course, live=False)
Expand All @@ -370,10 +374,12 @@ def test_create_featured_items():
cache_value = redis_cache.get("CMS_homepage_featured_courses")

assert len(cache_value) == 4
assert enrollable_future_course in cache_value
assert enrollable_other_future_course in cache_value
assert enrollable_self_paced_course in cache_value
assert in_progress_course in cache_value
assert set(cache_value) == {
enrollable_future_course,
enrollable_other_future_course,
enrollable_self_paced_course,
in_progress_course,
}

assert cache_value[0] == enrollable_self_paced_course
assert cache_value[1] == enrollable_future_course
Expand Down

0 comments on commit d09c972

Please sign in to comment.