Changed to handle non-installed sqlite.

This commit is contained in:
Jeremy Fincher 2003-11-19 14:51:58 +00:00
parent e5d71ac10a
commit dd9bd35fc2

View File

@ -33,9 +33,15 @@ import sets
from test import *
try:
import sqlite
except ImportError:
sqlite = None
class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
plugins = ('QuoteGrabs',)
if sqlite:
def testQuoteGrab(self):
testPrefix = 'foo!bar@baz'
self.assertError('grab foo')
@ -64,7 +70,8 @@ class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'a' * 80,
prefix=testPrefix))
self.assertNotError('grab foo')
self.assertResponse('quotegrabs list foo', '#1: test and #2: %s...' %\
self.assertResponse('quotegrabs list foo',
'#1: test and #2: %s...' %\
('a'*43)) # 50 - length of "#2: ..."
def testDuplicateGrabs(self):