From d3764764626a9cc392dee532818c9457b4cf81e2 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 9 Oct 2003 04:28:31 +0000 Subject: [PATCH] Added karma tests. --- test/test_ChannelDB.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/test_ChannelDB.py b/test/test_ChannelDB.py index 8f5a9d173..411a1b27a 100644 --- a/test/test_ChannelDB.py +++ b/test/test_ChannelDB.py @@ -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: