Added a test for nested plugins having the same command name as the plugin name. It fails right now.

This commit is contained in:
Jeremy Fincher 2005-03-09 07:28:35 +00:00
parent ecca13ec11
commit 52fabfdaf7

View File

@ -522,6 +522,13 @@ class SourceNestedPluginTestCase(PluginTestCase):
J J
""" """
irc.reply('j') irc.reply('j')
class same(callbacks.Commands):
def same(self, irc, msg, args):
"""takes no arguments
same
"""
irc.reply('same')
def test(self): def test(self):
cb = self.E(self.irc) cb = self.E(self.irc)
@ -539,6 +546,11 @@ class SourceNestedPluginTestCase(PluginTestCase):
self.assertHelp('help e g i j') self.assertHelp('help e g i j')
self.assertRegexp('list e', 'f, g h, and 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): class WithPrivateNoticeTestCase(ChannelPluginTestCase):
plugins = ('Utilities',) plugins = ('Utilities',)