test_callbacks: Fix PluginRegexpTestCase to actually check regexp callbacks

This commit is contained in:
Valentin Lorentz 2022-07-06 22:04:33 +02:00
parent d00113e92d
commit 6a943b8342
1 changed files with 3 additions and 0 deletions

View File

@ -978,9 +978,12 @@ class MultilinePrivmsgTestCase(ChannelPluginTestCase):
class PluginRegexpTestCase(PluginTestCase):
plugins = ()
class PCAR(callbacks.PluginRegexp):
regexps = ("test",)
def test(self, irc, msg, args):
"<foo>"
raise callbacks.ArgumentError
def testNoEscapingArgumentError(self):
self.irc.addCallback(self.PCAR(self.irc))
self.assertResponse('test', 'test <foo>')