mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-02 16:09:24 +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+')
|
self.assertNotRegexp('google calc 1000^2', r'\s+,\s+')
|
||||||
|
|
||||||
def testNoNoLicenseKeyError(self):
|
def testNoNoLicenseKeyError(self):
|
||||||
conf.supybot.plugins.Google.groupsSnarfer.setValue(True)
|
orig = conf.supybot.plugins.Google.searchSnarfer()
|
||||||
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'google blah'))
|
try:
|
||||||
self.assertNoResponse(' ')
|
conf.supybot.plugins.Google.searchSnarfer.setValue(True)
|
||||||
|
self.assertSnarfNoResponse('google blah')
|
||||||
|
finally:
|
||||||
|
conf.supybot.plugins.Google.searchSnarfer.setValue(orig)
|
||||||
|
|
||||||
def testGroupsSnarfer(self):
|
def testGroupsSnarfer(self):
|
||||||
orig = conf.supybot.plugins.Google.groupsSnarfer()
|
orig = conf.supybot.plugins.Google.groupsSnarfer()
|
||||||
|
Loading…
Reference in New Issue
Block a user