From af38fe56eeb6fc9fd24aa4652001a8fb6051b25a Mon Sep 17 00:00:00 2001 From: yatin Date: Wed, 26 Dec 2018 17:47:41 +0530 Subject: [PATCH] Make aodh tempest tests work with Python3 With Python3 aodh tests fails with below Error, this patch fixes it:- TypeError: a bytes-like object is required, not 'str' Change-Id: I447c384a280e6225f3617a251314b307855d6025 Closes-Bug: #1809802 --- telemetry_tempest_plugin/aodh/service/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telemetry_tempest_plugin/aodh/service/client.py b/telemetry_tempest_plugin/aodh/service/client.py index 1043a05..a2361a8 100644 --- a/telemetry_tempest_plugin/aodh/service/client.py +++ b/telemetry_tempest_plugin/aodh/service/client.py @@ -29,7 +29,7 @@ class AlarmingClient(rest_client.RestClient): uri_prefix = "v2" def deserialize(self, body): - return json.loads(body.replace("\n", "")) + return json.loads(body.decode('utf-8').replace("\n", "")) def serialize(self, body): return json.dumps(body)