def test_fail_invalid_message(self):
     bad_verack_bytes = b'\xf8' + self.verackbytes[1:]
     f = BytesIO(bad_verack_bytes)
     with self.assertRaises(ValueError):
         MsgSerializable.stream_deserialize(f)
 def test_read_msg_verack(self):
     f = BytesIO(self.verackbytes)
     m = MsgSerializable.stream_deserialize(f)
     self.assertEqual(m.command, msg_verack.command)