def test_no_program_enrollment(self):
"""
If a user is not enrolled a 404 should be raised when getting the price
"""
course_run, user = create_purchasable_course_run()
ProgramEnrollment.objects.filter(program=course_run.course.program, user=user).delete()
with self.assertRaises(Http404):
calculate_run_price(course_run, user)
评论列表
文章目录