mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +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 *
|
||||
|
||||
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):
|
||||
@ -72,7 +79,7 @@ class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'test',
|
||||
prefix=testPrefix))
|
||||
self.assertNotError('grab foo')
|
||||
self.assertNotError('grab foo') # note: NOT an error, still won't dupe
|
||||
self.assertNotError('grab foo') # note:NOTanerror,stillwon'tdupe
|
||||
self.assertResponse('quotegrabs list foo', '#1: test')
|
||||
|
||||
def testCaseInsensitivity(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user