mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
parent
06400596e9
commit
2c7c83b07d
@ -48,6 +48,7 @@ class Success(plugins.ChannelIdDatabasePlugin):
|
||||
pluginSelf = self
|
||||
self.originalClass = conf.supybot.replies.success.__class__
|
||||
class MySuccessClass(self.originalClass):
|
||||
__slots__ = ()
|
||||
def __call__(self):
|
||||
ret = pluginSelf.db.random(dynamic.msg.args[0])
|
||||
if ret is None:
|
||||
|
@ -27,10 +27,22 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
import supybot.conf as conf
|
||||
from supybot.test import *
|
||||
|
||||
class SuccessTestCase(PluginTestCase):
|
||||
plugins = ('Success',)
|
||||
class SuccessTestCase(ChannelPluginTestCase):
|
||||
plugins = ('Success', 'User')
|
||||
|
||||
def setUp(self):
|
||||
ChannelPluginTestCase.setUp(self)
|
||||
self.prefix = 'mf2!bar@baz'
|
||||
self.irc.feedMsg(ircmsgs.privmsg(self.nick, 'register tester moo',
|
||||
prefix=self.prefix))
|
||||
|
||||
def testSuccess(self):
|
||||
self.assertResponse('success add success1:', 'The operation succeeded.')
|
||||
self.assertResponse('success add success2:',
|
||||
'success1: Success #1 added.')
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user