Skip to content

Commit

Permalink
Fix tests to pass python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Wright committed Jun 10, 2014
1 parent 0facdaa commit 96f1b3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flask_security/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def encrypt_password(password):


def md5(data):
return hashlib.md5(data.encode('ascii')).hexdigest()
return hashlib.md5(data.encode('utf-8')).hexdigest()


def do_flash(message, category=None):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def test_view_configuration(client):
assert b"<h1>Login</h1>" in response.data

response = authenticate(client, endpoint='/custom_login')
assert b'location' in response.headers
assert 'location' in response.headers
assert response.headers['Location'] == 'http://localhost/post_login'

response = logout(client, endpoint='/custom_logout')
assert b'location' in response.headers
assert 'location' in response.headers
assert response.headers['Location'] == 'http://localhost/post_logout'

response = client.get('/http', headers={
Expand Down

0 comments on commit 96f1b3e

Please sign in to comment.