'Test handling of unicode characters in email addresses of students
who may enroll in a course.'

def test_unicode_email_addresses(self):

    enrollments = [u'student@example.com', u'ni\xf1o@example.com']
    for email in enrollments:
        self._create_enrollment(email)
    task_input = {'features': ['email']}
    with patch('lms.djangoapps.instructor_task.tasks_helper.runner._get_current_task'):
        result = upload_may_enroll_csv(None, None, self.course.id, task_input, 'calculated')
    num_enrollments = len(enrollments)
    self.assertDictContainsSubset({'attempted': num_enrollments, 'succeeded': num_enrollments, 'failed': 0}, result)
