'Verify that certificate_info_for_user works.'

@unpack
@data({'allow_certificate': False, 'whitelisted': False, 'grade': None, 'output': ['N', 'N', 'N/A']}, {'allow_certificate': True, 'whitelisted': True, 'grade': None, 'output': ['Y', 'N', 'N/A']}, {'allow_certificate': True, 'whitelisted': False, 'grade': 0.9, 'output': ['Y', 'N', 'N/A']}, {'allow_certificate': False, 'whitelisted': True, 'grade': 0.8, 'output': ['N', 'N', 'N/A']}, {'allow_certificate': False, 'whitelisted': None, 'grade': 0.8, 'output': ['N', 'N', 'N/A']})
def test_certificate_info_for_user(self, allow_certificate, whitelisted, grade, output):

    student = UserFactory()
    _ = CourseFactory.create(org='edx', number='verified', display_name='Verified    Course')
    student.profile.allow_certificate = allow_certificate
    student.profile.save()
    certificate_info = certificate_info_for_user(student, grade, whitelisted, user_certificate=None)
    self.assertEqual(certificate_info, output)
