From 0843710626361fb3ad30e2dbd046cf786051cc53 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 29 Sep 2003 04:36:41 +0000 Subject: [PATCH] More complete tests. --- test/test_ChannelCommands.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/test_ChannelCommands.py b/test/test_ChannelCommands.py index 69ea6b3d3..9c994b66e 100644 --- a/test/test_ChannelCommands.py +++ b/test/test_ChannelCommands.py @@ -33,20 +33,30 @@ from test import * import conf import ircdb +import ircmsgs class ChannelCommandsTestCase(ChannelPluginTestCase, PluginDocumentation): plugins = ('ChannelCommands',) - def testOpWithoutOps(self): + def testOp(self): self.assertError('op') + self.irc.feedMsg(ircmsgs.op(self.channel, self.nick)) + self.assertNotError('op') - def testHalfOpWithoutOps(self): + def testHalfOp(self): self.assertError('halfop') + self.irc.feedMsg(ircmsgs.op(self.channel, self.nick)) + self.assertNotError('halfop') - def testVoiceWithoutOps(self): + def testVoice(self): self.assertError('voice') + self.irc.feedMsg(ircmsgs.op(self.channel, self.nick)) + self.assertNotError('voice') - def testKbanWithoutOps(self): + def testKban(self): + self.irc.feedMsg(ircmsgs.join(self.channel, prefix='foobar!user@host')) self.assertError('kban foobar') + self.irc.feedMsg(ircmsgs.op(self.channel, self.nick)) + self.assertNotError('kban foobar') # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: