diff --git a/plugins/Misc/test.py b/plugins/Misc/test.py index f2825ecc8..18a916f61 100644 --- a/plugins/Misc/test.py +++ b/plugins/Misc/test.py @@ -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): diff --git a/src/ircdb.py b/src/ircdb.py index b55da6647..4fb9aba36 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -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)