First bit of quotegrab testing, just tests existing functionality.

More tests to come when functionality is added.
This commit is contained in:
Daniel DiPaolo 2003-11-03 19:22:06 +00:00
parent be3e5e482a
commit 33775aea0d
1 changed files with 22 additions and 1 deletions

View File

@ -29,11 +29,32 @@
# POSSIBILITY OF SUCH DAMAGE.
###
import sets
from test import *
class QuoteGrabsTestCase(PluginTestCase, PluginDocumentation):
class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation):
plugins = ('QuoteGrabs',)
def testQuoteGrab(self):
testPrefix = 'foo!bar@baz'
self.assertError('grab foo')
# Test join/part/notice (shouldn't grab)
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=testPrefix))
self.assertError('grab foo')
self.irc.feedMsg(ircmsgs.part(self.channel, prefix=testPrefix))
self.assertError('grab foo')
# Test privmsgs
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'something',
prefix=testPrefix))
self.assertNotError('grab foo')
self.assertResponse('quote foo', '<foo> something')
# Test actions
self.irc.feedMsg(ircmsgs.action(self.channel, 'moos',
prefix=testPrefix))
self.assertNotError('grab foo')
self.assertResponse('quote foo', '* foo moos')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: