Skip to content

Commit

Permalink
PEP8 fix for csrf.py files. Fix tests for Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Feb 15, 2014
1 parent 69d9eaf commit c40fea5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flask_wtf/csrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/templates/csrf.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!DOCTYPE html>

<html>
Expand Down
2 changes: 1 addition & 1 deletion tests/test_csrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.