plugins/Google/test.py: Updated testNoNoLicenseKeyError to change the proper config variable and be safe when doing so. Also should be using a Snarf assert.

This commit is contained in:
James Vega 2006-05-03 14:41:11 +00:00
parent 8d09aae3e0
commit f249946114

View File

@ -50,9 +50,12 @@ class GoogleTestCase(ChannelPluginTestCase):
self.assertNotRegexp('google calc 1000^2', r'\s+,\s+')
def testNoNoLicenseKeyError(self):
conf.supybot.plugins.Google.groupsSnarfer.setValue(True)
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'google blah'))
self.assertNoResponse(' ')
orig = conf.supybot.plugins.Google.searchSnarfer()
try:
conf.supybot.plugins.Google.searchSnarfer.setValue(True)
self.assertSnarfNoResponse('google blah')
finally:
conf.supybot.plugins.Google.searchSnarfer.setValue(orig)
def testGroupsSnarfer(self):
orig = conf.supybot.plugins.Google.groupsSnarfer()