mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fixed PrivmsgTextCase not to require Karma, which requires SQLite.
This commit is contained in:
parent
dca3a3c099
commit
4dcc4dea87
@ -290,10 +290,24 @@ class ProperStringificationOfReplyArgs(PluginTestCase):
|
|||||||
self.irc.addCallback(self.ExpectsString(self.irc))
|
self.irc.addCallback(self.ExpectsString(self.irc))
|
||||||
self.assertResponse('expectsstring lower [nonstring int]', '1')
|
self.assertResponse('expectsstring lower [nonstring int]', '1')
|
||||||
|
|
||||||
class PrivmsgTestCase(ChannelPluginTestCase):
|
class PrivmsgTestCaseWithKarma(ChannelPluginTestCase):
|
||||||
plugins = ('Utilities', 'Misc', 'Web', 'Karma', 'String')
|
plugins = ('Utilities', 'Misc', 'Web', 'Karma', 'String')
|
||||||
conf.allowEval = True
|
conf.allowEval = True
|
||||||
timeout = 2
|
timeout = 2
|
||||||
|
def testSecondInvalidCommandRespondsWithThreadedInvalidCommands(self):
|
||||||
|
try:
|
||||||
|
orig = conf.supybot.plugins.Karma.response()
|
||||||
|
conf.supybot.plugins.Karma.response.setValue(True)
|
||||||
|
self.assertNotRegexp('echo [foo++] [foo++]', 'not a valid')
|
||||||
|
_ = self.irc.takeMsg()
|
||||||
|
finally:
|
||||||
|
conf.supybot.plugins.Karma.response.setValue(orig)
|
||||||
|
|
||||||
|
|
||||||
|
class PrivmsgTestCase(ChannelPluginTestCase):
|
||||||
|
plugins = ('Utilities', 'Misc', 'Web', 'String')
|
||||||
|
conf.allowEval = True
|
||||||
|
timeout = 2
|
||||||
def testEmptySquareBrackets(self):
|
def testEmptySquareBrackets(self):
|
||||||
self.assertError('echo []')
|
self.assertError('echo []')
|
||||||
|
|
||||||
@ -505,15 +519,6 @@ class PrivmsgTestCase(ChannelPluginTestCase):
|
|||||||
finally:
|
finally:
|
||||||
conf.supybot.reply.whenNotCommand.set(original)
|
conf.supybot.reply.whenNotCommand.set(original)
|
||||||
|
|
||||||
def testSecondInvalidCommandRespondsWithThreadedInvalidCommands(self):
|
|
||||||
try:
|
|
||||||
orig = conf.supybot.plugins.Karma.response()
|
|
||||||
conf.supybot.plugins.Karma.response.setValue(True)
|
|
||||||
self.assertNotRegexp('echo [foo++] [foo++]', 'not a valid')
|
|
||||||
_ = self.irc.takeMsg()
|
|
||||||
finally:
|
|
||||||
conf.supybot.plugins.Karma.response.setValue(orig)
|
|
||||||
|
|
||||||
|
|
||||||
class PluginRegexpTestCase(PluginTestCase):
|
class PluginRegexpTestCase(PluginTestCase):
|
||||||
plugins = ()
|
plugins = ()
|
||||||
|
Loading…
Reference in New Issue
Block a user