From e518535bd3869cb3c0555c7f62e6615310bd9e57 Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Wed, 18 May 2016 14:11:40 -0700 Subject: [PATCH] Enable py3 for credential tests Enable python3 testing for credential tests. Change-Id: I8827b51f17ff547a8ab734a9f8fcf7b30d1cbddf --- keystone/credential/controllers.py | 3 ++- tests-py3-blacklist.txt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keystone/credential/controllers.py b/keystone/credential/controllers.py index 321acc4858..3ce16d92d2 100644 --- a/keystone/credential/controllers.py +++ b/keystone/credential/controllers.py @@ -49,7 +49,8 @@ class CredentialV3(controller.V3Controller): raise exception.ValidationError(attribute='access', target='blob') ret_ref = ref.copy() - ret_ref['id'] = hashlib.sha256(blob['access']).hexdigest() + ret_ref['id'] = hashlib.sha256( + blob['access'].encode('utf8')).hexdigest() # Update the blob with the trust_id, so credentials created # with a trust scoped token will result in trust scoped # tokens when authentication via ec2tokens happens diff --git a/tests-py3-blacklist.txt b/tests-py3-blacklist.txt index 8605b3a1ac..348847349d 100644 --- a/tests-py3-blacklist.txt +++ b/tests-py3-blacklist.txt @@ -1,4 +1,3 @@ keystone.tests.unit.test_v3_auth -keystone.tests.unit.test_v3_credential keystone.tests.unit.test_v3_oauth1 keystone.tests.unit.token.test_fernet_provider