示例#1
0
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)
示例#2
0
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)