'Test that students with unicode characters in emails is handled.'

@ddt.data([u'student@example.com', u'ni\xf1o@example.com'])
def test_unicode_emails(self, emails):

    for (i, email) in enumerate(emails):
        self.create_student('student{0}'.format(i), email)
    self.current_task = Mock()
    self.current_task.update_state = Mock()
    with patch('lms.djangoapps.instructor_task.tasks_helper.runner._get_current_task') as mock_current_task:
        mock_current_task.return_value = self.current_task
        result = CourseGradeReport.generate(None, None, self.course.id, None, 'graded')
    num_students = len(emails)
    self.assertDictContainsSubset({'attempted': num_students, 'succeeded': num_students, 'failed': 0}, result)
