Browse Source

Fix for python3

Change-Id: I81b676e0f3489f1c6dcd05918f4bd9b2ca034823
tags/0.1.0
Rocky 1 year ago
parent
commit
933ec08a96

+ 3
- 2
murano_tempest_tests/services/service_broker/service_broker_client.py View File

@@ -46,9 +46,10 @@ class ServiceBrokerClient(rest_client.RestClient):
46 46
         """
47 47
         uname = auth_provider.credentials.username
48 48
         pwd = auth_provider.credentials.password
49
+        auth = '{0}:{1}'.format(uname, pwd)
49 50
 
50
-        encoded_auth = base64.b64encode('{0}:{1}'.format(uname, pwd))
51
-        headers = {"Authorization": "Basic " + encoded_auth,
51
+        encoded_auth = base64.b64encode(auth.encode('utf-8'))
52
+        headers = {"Authorization": "Basic " + encoded_auth.decode('utf-8'),
52 53
                    'content-type': 'application/json'}
53 54
         return headers
54 55
 

Loading…
Cancel
Save