summaryrefslogtreecommitdiff
path: root/devel/tests.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-23 20:11:07 -0500
committerDan McGee <dan@archlinux.org>2011-06-23 20:11:07 -0500
commit82289ebb4432b3372b959430581afa0a2158acb9 (patch)
treeae28c0ff8f9a1d779c913ed641bde4ac084fef38 /devel/tests.py
parent9156003d2d93de57c663901c39ac66316a3d969e (diff)
Add a rematch_packager management command
This allows quick resolution of all unmatched packages, especially after tweaking the way find_user works. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/tests.py')
-rw-r--r--devel/tests.py12
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):