Formatting fix

This commit is contained in:
Patrick Smith 2018-10-16 21:20:31 -04:00
parent c7d5015942
commit 783ce58991
2 changed files with 2 additions and 2 deletions

View File

@ -25,6 +25,7 @@ def make_error_pages(app):
return render_template("error.html", message="Log in Failed"), 401 return render_template("error.html", message="Log in Failed"), 401
@app.errorhandler(CSRFError) @app.errorhandler(CSRFError)
# pylint: disable=unused-variable
def session_expired(e): def session_expired(e):
log_error(e) log_error(e)
return redirect(url_for("atst.root", sessionExpired=True, next=request.path)) return redirect(url_for("atst.root", sessionExpired=True, next=request.path))

View File

@ -1,10 +1,9 @@
def test_csrf_error(app, client): def test_csrf_error(app, client):
app.config.update({"WTF_CSRF_ENABLED": True}) app.config.update({"WTF_CSRF_ENABLED": True})
response = client.post( response = client.post(
"/requests/new/1", "/requests/new/1",
headers={ "Content-Type": "application/x-www-form-urlencoded" }, headers={"Content-Type": "application/x-www-form-urlencoded"},
data="csrf_token=invalid_token", data="csrf_token=invalid_token",
follow_redirects=True, follow_redirects=True,
) )