From ae8af84e6fd1f8f19f0cad6e1cd10811d269cc22 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 26 Aug 2004 13:26:47 +0000 Subject: [PATCH] RootWarner is a ChannelPluginTestCase and should use assertSnarf* asserts --- test/test_RootWarner.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/test/test_RootWarner.py b/test/test_RootWarner.py index f5cd4152d..b3ca9a0d0 100644 --- a/test/test_RootWarner.py +++ b/test/test_RootWarner.py @@ -31,31 +31,30 @@ from testsupport import * -class RootWarnerTestCase(PluginTestCase): +class RootWarnerTestCase(ChannelPluginTestCase): plugins = ('RootWarner',) - config = {'supybot.reply.whenNotCommand': False} - + def test(self): self.irc.feedMsg(ircmsgs.join('#foo', prefix='foo!root@host')) - self.assertNotError(' ') + self.assertSnarfNotError(' ') self.irc.feedMsg(ircmsgs.join('#foo', prefix='foo!~root@host')) - self.assertNotError(' ') + self.assertSnarfNotError(' ') self.irc.feedMsg(ircmsgs.join('#foo', prefix='foo!~foo@host')) - self.assertNoResponse(' ', 1) + self.assertSnarfNoResponse(' ', 1) def testConfigWarn(self): self.irc.feedMsg(ircmsgs.join('#foo', prefix='foo!root@host')) - self.assertNotError(' ') + self.assertSnarfNotError(' ') try: conf.supybot.plugins.RootWarner.warn.setValue(False) self.irc.feedMsg(ircmsgs.join('#foo', prefix='foo!root@host')) - self.assertNoResponse(' ', 1) + self.assertSnarfNoResponse(' ', 1) finally: conf.supybot.plugins.RootWarner.warn.setValue(True) def testConfigKick(self): self.irc.feedMsg(ircmsgs.join('#foo', prefix='foo!root@host')) - self.assertNotError(' ') + self.assertSnarfNotError(' ') try: conf.supybot.plugins.RootWarner.warn.setValue(False) conf.supybot.plugins.RootWarner.kick.setValue(True) @@ -67,11 +66,5 @@ class RootWarnerTestCase(PluginTestCase): conf.supybot.plugins.RootWarner.kick.setValue(False) - - - - - - # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: