diff --git a/test/test_callbacks.py b/test/test_callbacks.py index 4c2bdba57..4fac79c59 100644 --- a/test/test_callbacks.py +++ b/test/test_callbacks.py @@ -975,19 +975,33 @@ class MultilinePrivmsgTestCase(ChannelPluginTestCase): '-' + batch_name,))) -class PluginRegexpTestCase(PluginTestCase): +class PluginRegexpTestCase(ChannelPluginTestCase): plugins = () class PCAR(callbacks.PluginRegexp): - regexps = ("test",) + regexps = ("test", "test2") def test(self, irc, msg, args): "" raise callbacks.ArgumentError - def testNoEscapingArgumentError(self): + def test2(self, irc, msg, args): + "" + irc.reply("hello") + + def setUp(self): + super().setUp() self.irc.addCallback(self.PCAR(self.irc)) + + def testNoEscapingArgumentError(self): self.assertResponse('test', 'test ') + def testReply(self): + self.irc.feedMsg(ircmsgs.IrcMsg( + prefix=self.prefix, + command='PRIVMSG', + args=(self.channel, 'foo baz'))) + self.assertResponse(' ', 'hello') + class RichReplyMethodsTestCase(PluginTestCase): plugins = ('Config',) class NoCapability(callbacks.Plugin):