Fix tests to pass python 3

This commit is contained in:
Matt Wright
2014-06-10 11:11:53 -04:00
parent 0facdaacd9
commit 96f1b3e0d1
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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):
+2 -2
View File
@@ -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={