Created a new assertConnectionMessages() assert that will take it a list
of message strings (without the length and added \r\n), these are added
and compared against the actual connection messages passed in.
I.e:
self.assertEqual(
b''.join(connection.sent),
b'17\r\n:MISSING_CHECK: START\r\n\r\n'
b'15\r\n:MISSING_CHECK: END\r\n\r\n')
Becomes:
self.assertConnectionMessages(
[b':MISSING_CHECK: START',
b':MISSING_CHECK: END']
connection.sent)
And the hex lengths are automatically calculated. This because more
useful when you pass in variable messages and timestamps.
Change-Id: I405e218f6e6d6f12818f611e08d5c7f8963ee8c6
Signed-off-by: Matthew Oliver <matt@oliver.net.au>