def tokens_ready(setcookies, tokens):
    """check if all required tokens are present in set-cookies headers"""
    if setcookies == None or tokens == None:
        return False
    _tokens = tokens[:]
    for tk in setcookies:
        if tk in _tokens:
            _tokens.remove(tk)
    if len(_tokens) == 0:
        return True
    return False