def test_get_task_name(self, is_regeneration, expected): staff = AdminFactory.create() instructor_task = InstructorTaskFactory.create( task_input=json.dumps({}), requester=staff, task_key=Mock(), task_id=Mock() ) 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)
def test_get_task_name(self, is_regeneration, expected): staff = AdminFactory.create() instructor_task = InstructorTaskFactory.create( task_input=json.dumps({}), requester=staff, task_key=Mock(), task_id=Mock(), ) 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)