mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Changed to handle non-installed sqlite.
This commit is contained in:
parent
e5d71ac10a
commit
dd9bd35fc2
@ -33,9 +33,15 @@ import sets
|
|||||||
|
|
||||||
from test import *
|
from test import *
|
||||||
|
|
||||||
|
try:
|
||||||
|
import sqlite
|
||||||
|
except ImportError:
|
||||||
|
sqlite = None
|
||||||
|
|
||||||
|
|
||||||
class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||||
plugins = ('QuoteGrabs',)
|
plugins = ('QuoteGrabs',)
|
||||||
|
if sqlite:
|
||||||
def testQuoteGrab(self):
|
def testQuoteGrab(self):
|
||||||
testPrefix = 'foo!bar@baz'
|
testPrefix = 'foo!bar@baz'
|
||||||
self.assertError('grab foo')
|
self.assertError('grab foo')
|
||||||
@ -64,7 +70,8 @@ class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'a' * 80,
|
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'a' * 80,
|
||||||
prefix=testPrefix))
|
prefix=testPrefix))
|
||||||
self.assertNotError('grab foo')
|
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: ..."
|
('a'*43)) # 50 - length of "#2: ..."
|
||||||
|
|
||||||
def testDuplicateGrabs(self):
|
def testDuplicateGrabs(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user