Exemple #1
0
 def test_get_task_name(self, is_regeneration, expected):
     staff = AdminFactory.create()
     instructor_task = InstructorTaskFactory.create(
         task_input=json.dumps({}),
         requester=staff,
         task_key='',
         task_id='',
     )
     certificate_generation_history = CertificateGenerationHistory(
         course_id=instructor_task.course_id,
         generated_by=staff,
         instructor_task=instructor_task,
         is_regeneration=is_regeneration,
     )
     assert certificate_generation_history.get_task_name() == expected
Exemple #2
0
 def test_get_task_name(self, is_regeneration, expected):
     staff = AdminFactory.create()
     instructor_task = InstructorTaskFactory.create(
         task_input=json.dumps({}),
         requester=staff,
         task_key='',
         task_id='',
     )
     certificate_generation_history = CertificateGenerationHistory(
         course_id=instructor_task.course_id,
         generated_by=staff,
         instructor_task=instructor_task,
         is_regeneration=is_regeneration,
     )
     self.assertEqual(
         certificate_generation_history.get_task_name(),
         expected
     )
Exemple #3
0
 def test_get_certificate_generation_candidates(self, task_input, expected, is_regeneration):
     staff = AdminFactory.create()
     instructor_task = InstructorTaskFactory.create(
         task_input=json.dumps(task_input),
         requester=staff,
         task_key='',
         task_id='',
     )
     certificate_generation_history = CertificateGenerationHistory(
         course_id=instructor_task.course_id,
         generated_by=staff,
         instructor_task=instructor_task,
         is_regeneration=is_regeneration,
     )
     self.assertEqual(
         certificate_generation_history.get_certificate_generation_candidates(),
         expected
     )