mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Misc: Fix testTell.
This commit is contained in:
parent
28dc3dd3ac
commit
e86768b61a
@ -141,11 +141,14 @@ class MiscTestCase(ChannelPluginTestCase):
|
||||
def testTell(self):
|
||||
# This test fails because the test is seeing us as owner and Misc.tell
|
||||
# allows the owner to send messages to people the bot hasn't seen.
|
||||
oldprefix, self.prefix = self.prefix, 'tester!foo@bar__no_testcap__baz'
|
||||
self.nick = 'tester'
|
||||
m = self.getMsg('tell aljsdkfh [plugin tell]')
|
||||
self.failUnless('let you do' in m.args[1])
|
||||
m = self.getMsg('tell #foo [plugin tell]')
|
||||
self.failUnless('No need for' in m.args[1])
|
||||
m = self.getMsg('tell me you love me')
|
||||
m = self.irc.takeMsg()
|
||||
self.failUnless(m.args[0] == self.nick)
|
||||
|
||||
def testNoNestedTell(self):
|
||||
|
@ -1046,7 +1046,7 @@ def checkCapability(hostmask, capability, users=users, channels=channels,
|
||||
ignoreOwner=False):
|
||||
"""Checks that the user specified by name/hostmask has the capability given.
|
||||
"""
|
||||
if world.testing:
|
||||
if world.testing and '__no_testcap__' not in hostmask.split('@')[1]:
|
||||
return _x(capability, True)
|
||||
try:
|
||||
u = users.getUser(hostmask)
|
||||
|
Loading…
Reference in New Issue
Block a user