mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 09:34:05 +01:00
for Later plugin, add test for actual sending of notes to nicks upon their being seen.
This commit is contained in:
parent
a6d92a70e8
commit
9f26bb1420
@ -30,7 +30,7 @@
|
|||||||
from supybot.test import *
|
from supybot.test import *
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class LaterTestCase(PluginTestCase):
|
class LaterTestCase(ChannelPluginTestCase):
|
||||||
plugins = ('Later',)
|
plugins = ('Later',)
|
||||||
def testLaterWorksTwice(self):
|
def testLaterWorksTwice(self):
|
||||||
self.assertNotError('later tell foo bar')
|
self.assertNotError('later tell foo bar')
|
||||||
@ -62,5 +62,17 @@ class LaterTestCase(PluginTestCase):
|
|||||||
self.assertNotRegexp('later notes', 'foo')
|
self.assertNotRegexp('later notes', 'foo')
|
||||||
self.assertRegexp('later notes', 'moo')
|
self.assertRegexp('later notes', 'moo')
|
||||||
|
|
||||||
|
def testNoteSend(self):
|
||||||
|
self.assertNotError('later tell foo stuff')
|
||||||
|
self.assertNotError('later tell bar more stuff')
|
||||||
|
self.assertRegexp('later notes', 'bar.*foo')
|
||||||
|
testPrefix = 'foo!bar@baz'
|
||||||
|
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'something',
|
||||||
|
prefix=testPrefix))
|
||||||
|
m = self.getMsg(' ')
|
||||||
|
self.failUnless(str(m).startswith('PRIVMSG foo :Sent just now: <test> stuff'))
|
||||||
|
self.assertNotRegexp('later notes', 'foo')
|
||||||
|
self.assertRegexp('later notes', 'bar')
|
||||||
|
|
||||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user