mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 15:44:06 +01:00
Updated, added a test for errorReplyNoCapability.
This commit is contained in:
parent
2a60ba61c5
commit
b072772ea5
@ -367,7 +367,7 @@ class PrivmsgTestCase(ChannelPluginTestCase):
|
|||||||
|
|
||||||
|
|
||||||
class PrivmsgCommandAndRegexpTestCase(PluginTestCase):
|
class PrivmsgCommandAndRegexpTestCase(PluginTestCase):
|
||||||
plugins = ('Utilities',) # Gotta put something.
|
plugins = ()
|
||||||
class PCAR(callbacks.PrivmsgCommandAndRegexp):
|
class PCAR(callbacks.PrivmsgCommandAndRegexp):
|
||||||
def test(self, irc, msg, args):
|
def test(self, irc, msg, args):
|
||||||
"<foo>"
|
"<foo>"
|
||||||
@ -376,12 +376,13 @@ 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):
|
class RichReplyMethodsTestCase(PluginTestCase):
|
||||||
|
plugins = ()
|
||||||
|
class NoCapability(callbacks.Privmsg):
|
||||||
|
def error(self, irc, msg, args):
|
||||||
|
irc.errorNoCapability('admin')
|
||||||
def testErrorNoCapability(self):
|
def testErrorNoCapability(self):
|
||||||
class NoCapability(callbacks.RichReplyMethods):
|
self.irc.addCallback(self.NoCapability())
|
||||||
def error(self, s, **kwargs):
|
self.assertRegexp('error', 'admin')
|
||||||
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…
Reference in New Issue
Block a user