Fix test.assertHelp for commands with long help (XX more messages).

This commit is contained in:
Valentin Lorentz 2012-08-08 21:41:25 +02:00
parent 94d09da44a
commit 5f94da8660

View File

@ -286,6 +286,10 @@ class PluginTestCase(SupyTestCase):
if m is None: if m is None:
raise TimeoutError, query raise TimeoutError, query
self.failUnless(lastGetHelp in m.args[1], self.failUnless(lastGetHelp in m.args[1],
msg = m.args[1]
if 'more message' in msg:
msg = msg[0:-27] # Strip (XXX more messages)
self.failUnless(msg in lastGetHelp,
'%s is not the help (%s)' % (m.args[1], lastGetHelp)) '%s is not the help (%s)' % (m.args[1], lastGetHelp))
return m return m