def validate_token(token):
    if token is not None and not hasattr(token, "key"):
        raise ValueError("Invalid token.")
    return token
We test that conary retries in a bunch of cases
dataset/ETHPy150Open benoitc/restkit/restkit/filters.py/validate_token--crossover with--dataset/ETHPy150Open sassoftware/conary/conary_test/repositorytest/transporttest.py/TransportTest.testRetrying