From b072772ea54b51df868f2bf5dfb6174e45a99524 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 15 Jan 2004 12:07:31 +0000 Subject: [PATCH] Updated, added a test for errorReplyNoCapability. --- test/test_callbacks.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/test_callbacks.py b/test/test_callbacks.py index df2b634a5..3f86c9060 100644 --- a/test/test_callbacks.py +++ b/test/test_callbacks.py @@ -367,7 +367,7 @@ class PrivmsgTestCase(ChannelPluginTestCase): class PrivmsgCommandAndRegexpTestCase(PluginTestCase): - plugins = ('Utilities',) # Gotta put something. + plugins = () class PCAR(callbacks.PrivmsgCommandAndRegexp): def test(self, irc, msg, args): "" @@ -376,12 +376,13 @@ class PrivmsgCommandAndRegexpTestCase(PluginTestCase): self.irc.addCallback(self.PCAR()) self.assertResponse('test', 'test ') -class RichReplyMethodsTestCase(unittest.TestCase): +class RichReplyMethodsTestCase(PluginTestCase): + plugins = () + class NoCapability(callbacks.Privmsg): + def error(self, irc, msg, args): + irc.errorNoCapability('admin') def testErrorNoCapability(self): - class NoCapability(callbacks.RichReplyMethods): - def error(self, s, **kwargs): - assert 'admin' in s - x = NoCapability() - x.errorNoCapability('admin') + self.irc.addCallback(self.NoCapability()) + self.assertRegexp('error', 'admin') # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: