mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 02:24:12 +01:00
* added assertActionRegexp (semi-tested, not thoroughly tested)
This commit is contained in:
parent
a63ee1e304
commit
2ddb080a73
10
test/test.py
10
test/test.py
@ -242,7 +242,15 @@ class PluginTestCase(unittest.TestCase):
|
||||
self.failUnless(ircmsgs.isAction(m))
|
||||
if expectedResponse is not None:
|
||||
self.assertEqual(ircmsgs.unAction(m), expectedResponse)
|
||||
|
||||
|
||||
def assertActionRegexp(self, query, regexp, flags=re.I):
|
||||
m = self._feedMsg(query)
|
||||
if m is None:
|
||||
raise TimeoutError, query
|
||||
self.failUnless(ircmsgs.isAction(m))
|
||||
self.failUnless(re.search(regexp, ircmsgs.unAction(m), flags),
|
||||
'%r does not match %r' % (ircmsgs.unAction(m),
|
||||
regexp))
|
||||
|
||||
class ChannelPluginTestCase(PluginTestCase):
|
||||
channel = '#test'
|
||||
|
Loading…
Reference in New Issue
Block a user