From 52fabfdaf78294f03b7cfaf8d94fcb958e608789 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 9 Mar 2005 07:28:35 +0000 Subject: [PATCH] Added a test for nested plugins having the same command name as the plugin name. It fails right now. --- test/test_callbacks.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_callbacks.py b/test/test_callbacks.py index bab1aa55b..2ecb0353d 100644 --- a/test/test_callbacks.py +++ b/test/test_callbacks.py @@ -522,6 +522,13 @@ class SourceNestedPluginTestCase(PluginTestCase): J """ irc.reply('j') + class same(callbacks.Commands): + def same(self, irc, msg, args): + """takes no arguments + + same + """ + irc.reply('same') def test(self): cb = self.E(self.irc) @@ -539,6 +546,11 @@ class SourceNestedPluginTestCase(PluginTestCase): self.assertHelp('help e g i j') self.assertRegexp('list e', 'f, g h, and g i j') + def testCommandSameNameAsNestedPlugin(self): + cb = self.E(self.irc) + self.irc.addCallback(cb) + self.assertResponse('e same', 'same') + class WithPrivateNoticeTestCase(ChannelPluginTestCase): plugins = ('Utilities',)