mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Tests for karma/infobot interaction.
This commit is contained in:
parent
5e00bd4251
commit
1ad9816391
@ -43,7 +43,7 @@ if sqlite is not None:
|
|||||||
ibot = conf.supybot.plugins.Infobot
|
ibot = conf.supybot.plugins.Infobot
|
||||||
|
|
||||||
class InfobotTestCase(ChannelPluginTestCase):
|
class InfobotTestCase(ChannelPluginTestCase):
|
||||||
plugins = ('Infobot',)
|
plugins = ('Infobot', 'Karma')
|
||||||
_endRe = re.compile(r'!|, \S+\.|\.')
|
_endRe = re.compile(r'!|, \S+\.|\.')
|
||||||
def testIsSnarf(self):
|
def testIsSnarf(self):
|
||||||
learn = ibot.snarfUnaddressedDefinitions()
|
learn = ibot.snarfUnaddressedDefinitions()
|
||||||
@ -136,4 +136,7 @@ if sqlite is not None:
|
|||||||
ibot.answerUnaddressedQuestions.setValue(answer)
|
ibot.answerUnaddressedQuestions.setValue(answer)
|
||||||
ibot.snarfUnaddressedDefinitions.setValue(learn)
|
ibot.snarfUnaddressedDefinitions.setValue(learn)
|
||||||
|
|
||||||
|
def testNoKarmaDunno(self):
|
||||||
|
self.assertNoResponse('foo++')
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
@ -186,6 +186,9 @@ if sqlite is not None:
|
|||||||
self.assertRegexp('karma foo', '0')
|
self.assertRegexp('karma foo', '0')
|
||||||
self.assertNotRegexp('karma foo', '1')
|
self.assertNotRegexp('karma foo', '1')
|
||||||
|
|
||||||
|
def testNoKarmaDunno(self):
|
||||||
|
self.assertNotError('load Infobot')
|
||||||
|
self.assertNoResponse('foo++')
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user