mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-29 06:51:08 -05: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.
|
lists all commands, not just the public ones.
|
||||||
"""
|
"""
|
||||||
(optlist, rest) = getopt.getopt(args, '', ['private'])
|
(optlist, rest) = getopt.getopt(args, '', ['private'])
|
||||||
|
evenPrivate = False
|
||||||
for (option, argument) in optlist:
|
for (option, argument) in optlist:
|
||||||
if option == '--private':
|
if option == '--private':
|
||||||
evenPrivate = True
|
evenPrivate = True
|
||||||
@ -95,7 +96,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
name = name.lower()
|
name = name.lower()
|
||||||
if not name:
|
if not name:
|
||||||
names = [cb.name() for cb in irc.callbacks
|
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()
|
names.sort()
|
||||||
irc.reply(msg, ', '.join(names))
|
irc.reply(msg, ', '.join(names))
|
||||||
else:
|
else:
|
||||||
|
@ -71,6 +71,7 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
def testList(self):
|
def testList(self):
|
||||||
self.assertNotError('list MiscCommands')
|
self.assertNotError('list MiscCommands')
|
||||||
self.assertNotError('list misccommands')
|
self.assertNotError('list misccommands')
|
||||||
|
self.assertNotError('list')
|
||||||
# If Ctcp changes to public, these tests will break. So if
|
# If Ctcp changes to public, these tests will break. So if
|
||||||
# the next assert fails, change the plugin we test for public/private
|
# the next assert fails, change the plugin we test for public/private
|
||||||
# to some other non-public plugin.
|
# to some other non-public plugin.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user