Added karma tests.

This commit is contained in:
Jeremy Fincher 2003-10-09 04:28:31 +00:00
parent 657db2c1f7
commit d376476462
1 changed files with 12 additions and 1 deletions

View File

@ -38,7 +38,7 @@ except ImportError:
if sqlite is not None:
class ChannelDBTestCase(ChannelPluginTestCase, PluginDocumentation):
plugins = ('ChannelDB',)
plugins = ('ChannelDB', 'MiscCommands')
def test(self):
self.assertNotError('channelstats')
self.assertNotError('channelstats')
@ -51,6 +51,17 @@ if sqlite is not None:
def testNoKeyErrorStats(self):
self.assertNotRegexp('stats sweede', 'KeyError')
def testKarma(self):
self.assertRegexp('karma foobar', 'no karma')
try:
conf.replyWhenNotCommand = True
self.assertNoResponse('foobar++', 2)
finally:
conf.replyWhenNotCommand = False
self.assertRegexp('karma foobar', 'increased 1.*total.*1')
self.assertNoResponse('foobar--', 2)
self.assertRegexp('karma foobar', 'decreased 1.*total.*0')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: