From ca38340de6a6eda260253c6a9b49e79c3e8ca0c6 Mon Sep 17 00:00:00 2001 From: Kevin Murphy Date: Fri, 10 Sep 2004 08:31:17 +0000 Subject: [PATCH] Included test cases for new Misc.contributors command --- test/test_Misc.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/test_Misc.py b/test/test_Misc.py index eafbcc5c3..fd1a1ef55 100644 --- a/test/test_Misc.py +++ b/test/test_Misc.py @@ -114,6 +114,27 @@ class MiscTestCase(ChannelPluginTestCase): def testListIncludesDispatcherIfThereIsAnOriginalCommand(self): self.assertRegexp('list Dict', r'\bdict\b') + def testContributors(self): + # Test ability to list contributors + self.assertNotError('contributors Misc') + # Test ability to list contributions + self.assertNotError('contributors Misc skorobeus') + # Test handling of invalid plugin + self.assertRegexp('contributors InvalidPlugin', + 'No such plugin') + # Test handling of invalid person + self.assertRegexp('contributors Misc noname', + 'not a registered contributor') + # Test handling of valid person with no contributions + # Note: This will break if the listed person ever makes a contribution + # to the Misc plugin + self.assertRegexp('contributors Misc bwp', + 'listed as a contributor') + + def testContributorsIsCaseInsensitive(self): + self.assertNotError('contributors Misc Skorobeus') + self.assertNotError('contributors Misc sKoRoBeUs') + if network: def testVersion(self): print '*** This test should start passing when we have our '\