mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-21 16:10:39 +01:00
Added karma tests.
This commit is contained in:
parent
657db2c1f7
commit
d376476462
@ -38,7 +38,7 @@ except ImportError:
|
|||||||
|
|
||||||
if sqlite is not None:
|
if sqlite is not None:
|
||||||
class ChannelDBTestCase(ChannelPluginTestCase, PluginDocumentation):
|
class ChannelDBTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||||
plugins = ('ChannelDB',)
|
plugins = ('ChannelDB', 'MiscCommands')
|
||||||
def test(self):
|
def test(self):
|
||||||
self.assertNotError('channelstats')
|
self.assertNotError('channelstats')
|
||||||
self.assertNotError('channelstats')
|
self.assertNotError('channelstats')
|
||||||
@ -51,6 +51,17 @@ if sqlite is not None:
|
|||||||
def testNoKeyErrorStats(self):
|
def testNoKeyErrorStats(self):
|
||||||
self.assertNotRegexp('stats sweede', 'KeyError')
|
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:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user