'Test error if existing user is already in certificates exception list.'

def test_certificate_exception_already_exist(self):

    CertificateWhitelist.objects.create(user=self.enrolled_user_1, course_id=self.course.id, whitelist=True, notes='')
    csv_content = 'test_student1@example.com,dummy_notes'
    data = self.upload_file(csv_content=csv_content)
    self.assertEquals(len(data['row_errors']['user_already_white_listed']), 1)
    self.assertEquals(len(data['general_errors']), 0)
    self.assertEquals(len(data['success']), 0)
    self.assertEquals(len(CertificateWhitelist.objects.all()), 1)
