mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Fixed bugz0r in errorNoCapability.
This commit is contained in:
parent
cb73cc3b73
commit
3e93599419
@ -303,7 +303,8 @@ class RichReplyMethods(object):
|
||||
self.reply(self._makeReply(conf.replyError, s), **kwargs)
|
||||
|
||||
def errorNoCapability(self, capability, s='', **kwargs):
|
||||
self.error(self._makeReply(conf.replyNoCapability % s, s), **kwargs)
|
||||
s = self._makeReply(conf.replyNoCapability % capability, s)
|
||||
self.error(s, **kwargs)
|
||||
|
||||
def errorPossibleBug(self, s='', **kwargs):
|
||||
if s:
|
||||
|
@ -376,5 +376,12 @@ class PrivmsgCommandAndRegexpTestCase(PluginTestCase):
|
||||
self.irc.addCallback(self.PCAR())
|
||||
self.assertResponse('test', 'test <foo>')
|
||||
|
||||
class RichReplyMethodsTestCase(unittest.TestCase):
|
||||
def testErrorNoCapability(self):
|
||||
class NoCapability(callbacks.RichReplyMethods):
|
||||
def error(self, s, **kwargs):
|
||||
assert 'admin' in s
|
||||
x = NoCapability()
|
||||
x.errorNoCapability('admin')
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user