From ff6d5b291ed3c25dbe330548347e9519823bf0ba Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Wed, 1 Feb 2017 13:52:58 +0100 Subject: [PATCH] Fix swift key generation in python3 The swift key used in aws tests is generated in a fashion that doesn't work in python3. This fixes it. Change-Id: I31d7046f343987ca3803cfc95c189e5c9f6dcc8e --- heat_integrationtests/functional/test_aws_stack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat_integrationtests/functional/test_aws_stack.py b/heat_integrationtests/functional/test_aws_stack.py index 296ed8d412..1241d22aad 100644 --- a/heat_integrationtests/functional/test_aws_stack.py +++ b/heat_integrationtests/functional/test_aws_stack.py @@ -75,7 +75,7 @@ Outputs: self.object_container_name = test.rand_name() self.project_id = self.identity_client.project_id self.swift_key = hashlib.sha224( - str(random.getrandbits(256))).hexdigest()[:32] + str(random.getrandbits(256)).encode('ascii')).hexdigest()[:32] key_header = 'x-container-meta-temp-url-key' self.object_client.put_container(self.object_container_name, {key_header: self.swift_key})