Oops, missed something that should've been in the test case.

This commit is contained in:
Jeremy Fincher 2003-09-22 11:43:35 +00:00
parent b1b00401ed
commit 29d297af8d
2 changed files with 3 additions and 1 deletions

View File

@ -88,6 +88,7 @@ class MiscCommands(callbacks.Privmsg):
lists all commands, not just the public ones.
"""
(optlist, rest) = getopt.getopt(args, '', ['private'])
evenPrivate = False
for (option, argument) in optlist:
if option == '--private':
evenPrivate = True
@ -95,7 +96,7 @@ class MiscCommands(callbacks.Privmsg):
name = name.lower()
if not name:
names = [cb.name() for cb in irc.callbacks
if evenPrivate or hasattr(cb, 'public') and cb.public]
if evenPrivate or (hasattr(cb, 'public') and cb.public)]
names.sort()
irc.reply(msg, ', '.join(names))
else:

View File

@ -71,6 +71,7 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
def testList(self):
self.assertNotError('list MiscCommands')
self.assertNotError('list misccommands')
self.assertNotError('list')
# If Ctcp changes to public, these tests will break. So if
# the next assert fails, change the plugin we test for public/private
# to some other non-public plugin.