From 816cef8af706298336f7ba1837303812509bc1ff Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Thu, 18 Jun 2015 18:22:31 +0000 Subject: [PATCH] For sake of future python3 encode FakeMemcache hashes For Python3.x this change would be required, but the API tests don't yet run under Python3. Change-Id: I026dc4625aa09108b75d40d751d7ee8c766c4caa --- ceilometer/tests/api/v2/test_acl_scenarios.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ceilometer/tests/api/v2/test_acl_scenarios.py b/ceilometer/tests/api/v2/test_acl_scenarios.py index 05fa9e681..e50bc4813 100644 --- a/ceilometer/tests/api/v2/test_acl_scenarios.py +++ b/ceilometer/tests/api/v2/test_acl_scenarios.py @@ -34,8 +34,8 @@ VALID_TOKEN2 = '4562138218392832' class FakeMemcache(object): - TOKEN_HASH = hashlib.sha256(VALID_TOKEN).hexdigest() - TOKEN2_HASH = hashlib.sha256(VALID_TOKEN2).hexdigest() + TOKEN_HASH = hashlib.sha256(VALID_TOKEN.encode('utf-8')).hexdigest() + TOKEN2_HASH = hashlib.sha256(VALID_TOKEN2.encode('utf-8')).hexdigest() def get(self, key): if (key == "tokens/%s" % VALID_TOKEN or