def METHOD_NAME(self):
    # raise
    with self.assertRaises(exceptions.BetfairError):
        raise exceptions.KeepAliveError({})
    # pickle
    error = exceptions.KeepAliveError({})
    self.assertEqual(
        str(pickle.loads(pickle.dumps(error))),
        str(error),
    )