mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-04 09:21:07 -05: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)
|
self.reply(self._makeReply(conf.replyError, s), **kwargs)
|
||||||
|
|
||||||
def errorNoCapability(self, capability, 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):
|
def errorPossibleBug(self, s='', **kwargs):
|
||||||
if s:
|
if s:
|
||||||
|
@ -376,5 +376,12 @@ class PrivmsgCommandAndRegexpTestCase(PluginTestCase):
|
|||||||
self.irc.addCallback(self.PCAR())
|
self.irc.addCallback(self.PCAR())
|
||||||
self.assertResponse('test', 'test <foo>')
|
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:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user