fix resume test to handle fictional HistServ PRIVMSGs

This commit is contained in:
Shivaram Lingamneni 2019-01-02 18:04:01 -05:00
parent 60e24d34a6
commit aabf89a737

View File

@ -72,7 +72,7 @@ class ResumeTestCase(cases.BaseServerTestCase):
self.assertMessageEqual(resume_messages[1], command='RESUME', params=['SUCCESS', 'baz'])
# test replay of messages
privmsgs = [m for m in ms if m.command == 'PRIVMSG']
privmsgs = [m for m in ms if m.command == 'PRIVMSG' and m.prefix.startswith('bar')]
self.assertEqual(len(privmsgs), 2)
privmsgs.sort(key=lambda m: m.params[0])
self.assertMessageEqual(privmsgs[0], command='PRIVMSG', params=['#xyz', 'hello friends'])