diff options
Diffstat (limited to 'devel/tests.py')
-rw-r--r-- | devel/tests.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/devel/tests.py b/devel/tests.py index c982e502..36691179 100644 --- a/devel/tests.py +++ b/devel/tests.py @@ -1,7 +1,7 @@ from django.test import TestCase from django.contrib.auth.models import User -from devel.utils import UserFinder +from devel.utils import UserFinder from main.models import UserProfile class DevelTest(TestCase): @@ -87,6 +87,16 @@ class FindUserTest(TestCase): self.assertEqual(self.user3, self.finder.find("Bob Jones <bjones AT Arch Linux DOT org>")) + def test_by_invalid(self): + self.assertEqual(self.user1, + self.finder.find("Joe User <user1@example.com")) + self.assertEqual(self.user1, + self.finder.find("Joe 'nickname' User <user1@example.com")) + self.assertEqual(self.user1, + self.finder.find("Joe \"nickname\" User <user1@example.com")) + self.assertEqual(self.user1, + self.finder.find("Joe User <joe@differentdomain.com")) + def test_cache(self): # simply look two of them up, but then do it repeatedly for i in range(50): |