def token(data, config): token = generate(data, config['SECRET_KEY']) tokens.add(token) return token
def test_generated_token_contains_user_id(data, key): token = generate(data, key) result = verify_to_value(token, key) assert result == data
def expired_token(data, key): return generate(data, key, exp=0)
def test_generated_token_is_string(data, key): token = generate(data, key) assert isinstance(token, six.string_types)
def token(data, key): return generate(data, key)