Switchamabob

This commit is contained in:
James Vega 2004-08-19 17:57:55 +00:00
parent 23c4267744
commit fa84b0c87c
2 changed files with 3 additions and 2 deletions

View File

@ -611,8 +611,8 @@ class Infobot(callbacks.PrivmsgCommandAndRegexp):
""" """
irc.reply('There have been %s answered and %s made ' irc.reply('There have been %s answered and %s made '
'to the database since this plugin was loaded.' % 'to the database since this plugin was loaded.' %
(utils.nItems('request', self.db.getChangeCount()), (utils.nItems('request', self.db.getResponseCount()),
utils.nItems('change', self.db.getResponseCount()))) utils.nItems('change', self.db.getChangeCount())))
def tell(self, irc, msg, args): def tell(self, irc, msg, args):
"""<nick> [about] <factoid> """<nick> [about] <factoid>

View File

@ -52,6 +52,7 @@ if sqlite is not None:
ibot.snarfUnaddressedDefinitions.setValue(True) ibot.snarfUnaddressedDefinitions.setValue(True)
ibot.answerUnaddressedQuestions.setValue(True) ibot.answerUnaddressedQuestions.setValue(True)
self.assertSnarfNoResponse('foo is at http://bar.com/', 2) self.assertSnarfNoResponse('foo is at http://bar.com/', 2)
self.assertRegexp('infobot stats', '1 change')
self.assertSnarfRegexp('foo?', r'foo.*is.*http://bar.com/') self.assertSnarfRegexp('foo?', r'foo.*is.*http://bar.com/')
self.assertSnarfNoResponse('foo is at http://baz.com/', 2) self.assertSnarfNoResponse('foo is at http://baz.com/', 2)
self.assertSnarfNotRegexp('foo?', 'baz') self.assertSnarfNotRegexp('foo?', 'baz')