mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
More complete tests.
This commit is contained in:
parent
6e23e1d080
commit
0843710626
@ -33,20 +33,30 @@ from test import *
|
|||||||
|
|
||||||
import conf
|
import conf
|
||||||
import ircdb
|
import ircdb
|
||||||
|
import ircmsgs
|
||||||
|
|
||||||
class ChannelCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
class ChannelCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||||
plugins = ('ChannelCommands',)
|
plugins = ('ChannelCommands',)
|
||||||
def testOpWithoutOps(self):
|
def testOp(self):
|
||||||
self.assertError('op')
|
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.assertError('halfop')
|
||||||
|
self.irc.feedMsg(ircmsgs.op(self.channel, self.nick))
|
||||||
|
self.assertNotError('halfop')
|
||||||
|
|
||||||
def testVoiceWithoutOps(self):
|
def testVoice(self):
|
||||||
self.assertError('voice')
|
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.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:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user