def setUpTestData(cls):
with mute_signals(post_save):
cls.profile = ProfileFactory.create()
cls.program, _ = create_program(past=True)
cls.course_run = cls.program.course_set.first().courserun_set.first()
CachedCurrentGradeFactory.create(
user=cls.profile.user,
course_run=cls.course_run,
data={
"passed": True,
"percent": 0.9,
"course_key": cls.course_run.edx_course_key,
"username": cls.profile.user.username
}
)
CachedCertificateFactory.create(user=cls.profile.user, course_run=cls.course_run)
cls.exam_run = ExamRunFactory.create(
course=cls.course_run.course,
date_first_schedulable=now_in_utc() - timedelta(days=1),
)
评论列表
文章目录