'To prevent almost identical usernames, visually identical but differing
by their unicode code points only, Unicode NFKC normalization should
make appear them equal to Django.'

def test_duplicate_normalized_unicode(self):

    omega_username = 'iamthe\xce\xa9'
    ohm_username = 'iamthe\xe2\x84\xa6'
    self.assertNotEqual(omega_username, ohm_username)
    User.objects.create_user(username=omega_username, password='pwd')
    data = {'username': ohm_username, 'password1': 'pwd2', 'password2': 'pwd2'}
    form = UserCreationForm(data)
    self.assertFalse(form.is_valid())
    self.assertEqual(form.errors['username'], ['A    user    with    that    username    already    exists.'])
