mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Oops, missed something that should've been in the test case.
This commit is contained in:
parent
b1b00401ed
commit
29d297af8d
@ -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:
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user