From 33775aea0da42949a33b4f691df4af9aaf7e815e Mon Sep 17 00:00:00 2001 From: Daniel DiPaolo Date: Mon, 3 Nov 2003 19:22:06 +0000 Subject: [PATCH] First bit of quotegrab testing, just tests existing functionality. More tests to come when functionality is added. --- test/test_QuoteGrabs.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/test_QuoteGrabs.py b/test/test_QuoteGrabs.py index 578764673..ef7ae7dbe 100644 --- a/test/test_QuoteGrabs.py +++ b/test/test_QuoteGrabs.py @@ -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', ' 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: