test_utils.py 440 B

12345678910111213
  1. from django.test import TestCase
  2. from misago.users.utils import hash_email
  3. class HashEmailTests(TestCase):
  4. def test_is_case_insensitive(self):
  5. """util is case insensitive"""
  6. self.assertEqual(hash_email("abc@test.com"), hash_email("aBc@tEst.cOm"))
  7. def test_handles_unicode(self):
  8. """util works with unicode strings"""
  9. self.assertEqual(hash_email("łóć@test.com"), hash_email("ŁÓĆ@tEst.cOm"))