mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-01 16:01:05 -05:00
Made it depend on sqlite.
This commit is contained in:
parent
6584790a4d
commit
e65a7ec17c
@ -31,26 +31,32 @@
|
|||||||
|
|
||||||
from testsupport import *
|
from testsupport import *
|
||||||
|
|
||||||
class InfobotTestCase(PluginTestCase):
|
try:
|
||||||
plugins = ('Infobot',)
|
import sqlite
|
||||||
def testIsSnarf(self):
|
except ImportError:
|
||||||
self.assertNoResponse('foo is at http://bar.com/', 2)
|
sqlite = None
|
||||||
self.assertRegexp('foo?', r'foo.*is.*http://bar.com/')
|
|
||||||
self.assertNoResponse('foo is at http://baz.com/', 2)
|
|
||||||
self.assertNotRegexp('foo?', 'baz')
|
|
||||||
|
|
||||||
def testAreSnarf(self):
|
if sqlite is not None:
|
||||||
self.assertNoResponse('bars are dirty', 2)
|
class InfobotTestCase(PluginTestCase):
|
||||||
self.assertRegexp('bars?', 'bars.*are.*dirty')
|
plugins = ('Infobot',)
|
||||||
self.assertNoResponse('bars are not dirty', 2)
|
def testIsSnarf(self):
|
||||||
self.assertNotRegexp('bars?', 'not')
|
self.assertNoResponse('foo is at http://bar.com/', 2)
|
||||||
|
self.assertRegexp('foo?', r'foo.*is.*http://bar.com/')
|
||||||
|
self.assertNoResponse('foo is at http://baz.com/', 2)
|
||||||
|
self.assertNotRegexp('foo?', 'baz')
|
||||||
|
|
||||||
def testIsResponses(self):
|
def testAreSnarf(self):
|
||||||
self.assertNoResponse('foo is bar', 2)
|
self.assertNoResponse('bars are dirty', 2)
|
||||||
self.assertRegexp('foo?', 'foo.*is.*bar')
|
self.assertRegexp('bars?', 'bars.*are.*dirty')
|
||||||
self.assertNoResponse('when is foo?', 2)
|
self.assertNoResponse('bars are not dirty', 2)
|
||||||
self.assertNoResponse('why is foo?', 2)
|
self.assertNotRegexp('bars?', 'not')
|
||||||
self.assertNoResponse('why foo?', 2)
|
|
||||||
self.assertNoResponse('when is foo?', 2)
|
def testIsResponses(self):
|
||||||
|
self.assertNoResponse('foo is bar', 2)
|
||||||
|
self.assertRegexp('foo?', 'foo.*is.*bar')
|
||||||
|
self.assertNoResponse('when is foo?', 2)
|
||||||
|
self.assertNoResponse('why is foo?', 2)
|
||||||
|
self.assertNoResponse('why foo?', 2)
|
||||||
|
self.assertNoResponse('when is foo?', 2)
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user