Add some Raise=True and a test for multiple replies from Misc.hostmask.

This commit is contained in:
James Vega 2004-12-15 17:54:33 +00:00
parent c8af5c886b
commit cedd6a2b59
3 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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]):

View File

@ -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')