Skip to content
Browse files

PEP8 fix for csrf.py files. Fix tests for Python 3

  • Loading branch information...
1 parent 69d9eaf commit c40fea58cd6982864bb796852a631912604ed4dc @lepture committed
Showing with 2 additions and 3 deletions.
  1. +1 −1 flask_wtf/csrf.py
  2. +0 −1 tests/templates/csrf.html
  3. +1 −1 tests/test_csrf.py
View
2 flask_wtf/csrf.py
@@ -137,7 +137,7 @@ def init_app(self, app):
@app.context_processor
def csrf_token():
return dict(csrf_token=generate_csrf)
-
+
@app.before_request
def _csrf_protect():
# many things come from django.middleware.csrf
View
1 tests/templates/csrf.html
@@ -1,4 +1,3 @@
-
<!DOCTYPE html>
<html>
View
2 tests/test_csrf.py
@@ -191,4 +191,4 @@ def withtoken():
return render_template("csrf.html")
response = self.client.get('/token')
- assert re.compile('token: [a-zA-Z0-9#.]{3,}').search(response.data)
+ assert b'#' in response.data

0 comments on commit c40fea5

Please sign in to comment.
Something went wrong with that request. Please try again.