Make log test compatible with python3

Change-Id: If273926c84b5025e13e31a833599bf7252f1f8ee
This commit is contained in:
Adrian Czarnecki 2018-08-09 10:42:18 +02:00
parent 33bc7a08c0
commit f983593efb
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@
# under the License.
from oslo_serialization import jsonutils as json
from six import PY3
from tempest.lib.common import rest_client
@ -28,6 +29,7 @@ class LogsSearchClient(rest_client.RestClient):
@staticmethod
def deserialize(body):
body = body.decode('utf-8') if PY3 else body
return json.loads(body.replace("\n", ""))
@staticmethod