Пример #1
0
 def setUp(self):
     super(CertificateManagementTest, self).setUp()
     self.user = UserFactory.create()
     self.courses = [
         CourseFactory.create()
         for __ in range(3)
     ]
     CourseCompleteImageConfigurationFactory.create()
Пример #2
0
 def setUp(self):
     super(CertificateManagementTest, self).setUp()
     self.user = UserFactory.create()
     self.courses = [
         CourseFactory.create()
         for __ in range(3)
     ]
     CourseCompleteImageConfigurationFactory.create()
Пример #3
0
 def setUp(self):
     super(CertificateManagementTest, self).setUp()
     self.user = UserFactory.create()
     self.courses = [CourseFactory.create() for __ in range(3)]
     for course in self.courses:
         chapter = ItemFactory.create(parent_location=course.location)
         ItemFactory.create(parent_location=chapter.location, category="sequential", graded=True)
     CourseCompleteImageConfigurationFactory.create()
 def setUp(self):
     super(CertificateManagementTest, self).setUp()
     self.user = UserFactory.create()
     self.courses = [CourseFactory.create() for __ in range(3)]
     for course in self.courses:
         chapter = ItemFactory.create(parent_location=course.location)
         ItemFactory.create(parent_location=chapter.location,
                            category='sequential',
                            graded=True)
     CourseCompleteImageConfigurationFactory.create()
Пример #5
0
 def test_badge_callback(self, handler):
     student = UserFactory()
     course = CourseFactory.create(org='edx', number='998', display_name='Test Course', issue_badges=True)
     CourseCompleteImageConfigurationFactory()
     CourseEnrollmentFactory(user=student, course_id=course.location.course_key, mode='honor')
     cert = GeneratedCertificateFactory.create(
         user=student,
         course_id=course.id,
         status=CertificateStatuses.generating,
         mode='verified'
     )
     cert.status = CertificateStatuses.downloadable
     cert.save()
     self.assertTrue(handler.return_value.award.called)