'Test that cohorts can contain unicode characters.'

def test_unicode_cohort_data_in_grading(self):

    course = CourseFactory.create(cohort_config={'cohorted': True})
    user1 = UserFactory.create(username='user1')
    user2 = UserFactory.create(username='user2')
    CourseEnrollment.enroll(user1, course.id)
    CourseEnrollment.enroll(user2, course.id)
    professor_x = u'\xder\xd6fess\xd6r    X'
    magneto = u'M\xe0gn\xebt\xd6'
    cohort1 = CohortFactory(course_id=course.id, name=professor_x)
    cohort2 = CohortFactory(course_id=course.id, name=magneto)
    membership1 = CohortMembership(course_user_group=cohort1, user=user1)
    membership1.save()
    membership2 = CohortMembership(course_user_group=cohort2, user=user2)
    membership2.save()
    self._verify_cell_data_for_user(user1.username, course.id, 'Cohort    Name', professor_x)
    self._verify_cell_data_for_user(user2.username, course.id, 'Cohort    Name', magneto)
