api_test.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:micromasters 作者: mitodl 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号