Fix Misc tests not to rely on Gameknot

This commit is contained in:
Daniel DiPaolo 2005-02-01 07:39:28 +00:00
parent a93db7df32
commit 739c9ceda7

View File

@ -30,7 +30,8 @@
from supybot.test import * from supybot.test import *
class MiscTestCase(ChannelPluginTestCase): class MiscTestCase(ChannelPluginTestCase):
plugins = ('Misc', 'Utilities', 'Gameknot', 'Anonymous', 'Dict', 'User') # plugins = ('Misc', 'Utilities', 'Gameknot', 'Anonymous', 'Dict', 'User')
plugins = ('Misc', 'Utilities', 'Anonymous', 'Dict', 'User')
def testAction(self): def testAction(self):
self.assertAction('action moos', 'moos') self.assertAction('action moos', 'moos')
@ -47,19 +48,19 @@ class MiscTestCase(ChannelPluginTestCase):
finally: finally:
conf.supybot.reply.whenNotCommand.set(original) conf.supybot.reply.whenNotCommand.set(original)
if network: # if network:
def testNotReplyWhenRegexpsMatch(self): # def testNotReplyWhenRegexpsMatch(self):
try: # try:
orig = conf.supybot.reply.whenNotCommand() # orig = conf.supybot.reply.whenNotCommand()
gk = conf.supybot.plugins.Gameknot.gameSnarfer() # gk = conf.supybot.plugins.Gameknot.gameSnarfer()
conf.supybot.reply.whenNotCommand.setValue(True) # conf.supybot.reply.whenNotCommand.setValue(True)
conf.supybot.plugins.Gameknot.gameSnarfer.setValue(True) # conf.supybot.plugins.Gameknot.gameSnarfer.setValue(True)
self.prefix = 'somethingElse!user@host.domain.tld' # self.prefix = 'somethingElse!user@host.domain.tld'
self.assertSnarfNotError( # self.assertSnarfNotError(
'http://gameknot.com/chess.pl?bd=1019508') # 'http://gameknot.com/chess.pl?bd=1019508')
finally: # finally:
conf.supybot.reply.whenNotCommand.setValue(orig) # conf.supybot.reply.whenNotCommand.setValue(orig)
conf.supybot.plugins.Gameknot.gameSnarfer.setValue(gk) # conf.supybot.plugins.Gameknot.gameSnarfer.setValue(gk)
def testNotReplyWhenNotCanonicalName(self): def testNotReplyWhenNotCanonicalName(self):
try: try: