mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
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:
parent
8d09aae3e0
commit
f249946114
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user