def test_validate_not_expiring_csrf(app): with app.test_request_context(): token = csrf_token.generate_csrf(time_limit=False) assert csrf_token.validate_csrf(token, time_limit=False)
def test_validate_csrf(app): with app.test_request_context(): assert not csrf_token.validate_csrf('ff##dd') token = csrf_token.generate_csrf() assert csrf_token.validate_csrf(token)