def test_available_date(self, enrollment_mode, certificate_status, expected_value): self.enrollment.mode = enrollment_mode self.enrollment.save() self.certificate.mode = CourseMode.VERIFIED self.certificate.status = certificate_status self.assertEqual(expected_value, api.is_certificate_valid(self.certificate))
def test_is_certificate_valid(self, enrollment_mode, certificate_status, expected_value): self.enrollment.mode = enrollment_mode self.enrollment.save() self.certificate.mode = CourseMode.VERIFIED self.certificate.status = certificate_status self.assertEqual(expected_value, api.is_certificate_valid(self.certificate))
def test_is_certificate_valid(self, enrollment_mode, certificate_status, expected_value): self.enrollment.mode = enrollment_mode self.enrollment.save() self.certificate.mode = CourseMode.VERIFIED self.certificate.status = certificate_status assert expected_value == api.is_certificate_valid(self.certificate)