diff options
| author | Steve Block <steveblock@google.com> | 2009-12-15 10:12:09 +0000 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2009-12-17 17:41:10 +0000 |
| commit | 643ca7872b450ea4efacab6188849e5aac2ba161 (patch) | |
| tree | 6982576c228bcd1a7efe98afed544d840751094c /WebKitTools/Scripts/modules/committers_unittest.py | |
| parent | d026980fde6eb3b01c1fe49441174e89cd1be298 (diff) | |
| download | external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.zip external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.gz external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.bz2 | |
Merge webkit.org at r51976 : Initial merge by git.
Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43
Diffstat (limited to 'WebKitTools/Scripts/modules/committers_unittest.py')
| -rw-r--r-- | WebKitTools/Scripts/modules/committers_unittest.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/WebKitTools/Scripts/modules/committers_unittest.py b/WebKitTools/Scripts/modules/committers_unittest.py index 045e20e..cf9f486 100644 --- a/WebKitTools/Scripts/modules/committers_unittest.py +++ b/WebKitTools/Scripts/modules/committers_unittest.py @@ -33,20 +33,30 @@ class CommittersTest(unittest.TestCase): def test_committer_lookup(self): committer = Committer('Test One', 'one@test.com') - reviewer = Reviewer('Test Two', 'two@test.com') + reviewer = Reviewer('Test Two', ['two@test.com', 'two@rad.com', 'so_two@gmail.com']) committer_list = CommitterList(committers=[committer], reviewers=[reviewer]) # Test valid committer and reviewer lookup - self.assertEqual(committer_list.committer_by_bugzilla_email('one@test.com'), committer) - self.assertEqual(committer_list.reviewer_by_bugzilla_email('two@test.com'), reviewer) - self.assertEqual(committer_list.committer_by_bugzilla_email('two@test.com'), reviewer) + self.assertEqual(committer_list.committer_by_email('one@test.com'), committer) + self.assertEqual(committer_list.reviewer_by_email('two@test.com'), reviewer) + self.assertEqual(committer_list.committer_by_email('two@test.com'), reviewer) + self.assertEqual(committer_list.committer_by_email('two@rad.com'), reviewer) + self.assertEqual(committer_list.reviewer_by_email('so_two@gmail.com'), reviewer) # Test that a known committer is not returned during reviewer lookup - self.assertEqual(committer_list.reviewer_by_bugzilla_email('one@test.com'), None) + self.assertEqual(committer_list.reviewer_by_email('one@test.com'), None) # Test that unknown email address fail both committer and reviewer lookup - self.assertEqual(committer_list.committer_by_bugzilla_email('bar@bar.com'), None) - self.assertEqual(committer_list.reviewer_by_bugzilla_email('bar@bar.com'), None) + self.assertEqual(committer_list.committer_by_email('bar@bar.com'), None) + self.assertEqual(committer_list.reviewer_by_email('bar@bar.com'), None) + + # Test that emails returns a list. + self.assertEqual(committer.emails, ['one@test.com']) + + # Test that committers returns committers and reviewers and reviewers() just reviewers. + self.assertEqual(committer_list.committers(), [committer, reviewer]) + self.assertEqual(committer_list.reviewers(), [reviewer]) + if __name__ == '__main__': unittest.main() |
