def test_no_current_financial_aid(self):
"""
Purchasable course runs must have financial aid available
"""
course_run, user = create_purchasable_course_run()
program = course_run.course.program
tier_program = program.tier_programs.first()
tier_program.current = False
tier_program.save()
with self.assertRaises(ValidationError) as ex:
get_purchasable_course_run(course_run.edx_course_key, user)
assert ex.exception.args[0] == (
"Course run {} does not have a current attached financial aid application".format(
course_run.edx_course_key
)
)
评论列表
文章目录