def METHOD_NAME(self, exception, attributes):
    pickled = pickle.dumps(exception)
    unpickled = pickle.loads(pickled)
    assert type(unpickled) is type(exception)
    assert str(unpickled) == str(exception)
    for attribute in attributes:
        assert getattr(unpickled, attribute) == getattr(exception, attribute)