mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-03 16:52:34 +01:00
Add some Raise=True and a test for multiple replies from Misc.hostmask.
This commit is contained in:
parent
c8af5c886b
commit
cedd6a2b59
@ -316,7 +316,8 @@ class User(callbacks.Privmsg):
|
||||
user = ircdb.users.getUser(msg.prefix)
|
||||
if name:
|
||||
if name != user.name and not user.checkCapability('owner'):
|
||||
irc.error('You may only retrieve your own hostmasks.')
|
||||
irc.error('You may only retrieve your own hostmasks.',
|
||||
Raise=True)
|
||||
else:
|
||||
try:
|
||||
user = ircdb.users.getUser(name)
|
||||
|
@ -344,7 +344,7 @@ def getSeenNick(irc, msg, args, state, errmsg=None):
|
||||
except KeyError:
|
||||
if errmsg is None:
|
||||
errmsg = 'I haven\'t seen %s.' % args[0]
|
||||
irc.error(errmsg)
|
||||
irc.error(errmsg, Raise=True)
|
||||
|
||||
def getChannel(irc, msg, args, state):
|
||||
if args and irc.isChannel(args[0]):
|
||||
|
@ -244,6 +244,9 @@ class MiscTestCase(ChannelPluginTestCase):
|
||||
|
||||
def testHostmask(self):
|
||||
self.assertResponse('hostmask', self.prefix)
|
||||
self.assertError('@hostmask asdf')
|
||||
m = self.irc.takeMsg()
|
||||
self.failIf(m is not None, m)
|
||||
|
||||
def testApropos(self):
|
||||
self.assertNotError('apropos f')
|
||||
|
Loading…
Reference in New Issue
Block a user