From db2a5bad0b15b7566b7ec67ba2d591592b7a4a82 Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Tue, 6 Oct 2015 16:03:30 +0300 Subject: [PATCH] [Py34] api.openstack.test_faults.TestFaultWrapper `webob.response.Response._body__get_` returns binary value. It should be decoded, so we will be able to check string contains substring. Related bp nova-python3-mitaka Change-Id: I38cbc4b62b29d063c795ac64f76d267ac463a072 --- nova/tests/unit/api/openstack/test_faults.py | 3 +-- tests-py3.txt | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/nova/tests/unit/api/openstack/test_faults.py b/nova/tests/unit/api/openstack/test_faults.py index e02247893191..1bd56a87c554 100644 --- a/nova/tests/unit/api/openstack/test_faults.py +++ b/nova/tests/unit/api/openstack/test_faults.py @@ -16,7 +16,6 @@ import mock from oslo_serialization import jsonutils -import six import webob import webob.dec import webob.exc @@ -57,7 +56,7 @@ class TestFaultWrapper(test.NoDBTestCase): # translate(). mock_translate.assert_any_call(u'Should be translated.', None) # The return value from translate() should appear in the response. - self.assertIn("I've been translated!", six.text_type(response.body)) + self.assertIn("I've been translated!", response.body.decode("UTF-8")) class TestFaults(test.NoDBTestCase): diff --git a/tests-py3.txt b/tests-py3.txt index e5565be5088f..a09231ba6d55 100644 --- a/tests-py3.txt +++ b/tests-py3.txt @@ -139,7 +139,6 @@ nova.tests.unit.api.openstack.compute.test_volumes.VolumeApiTestV2 nova.tests.unit.api.openstack.compute.test_volumes.VolumeApiTestV21 nova.tests.unit.api.openstack.compute.test_volumes.VolumeAttachTestsV2 nova.tests.unit.api.openstack.compute.test_volumes.VolumeAttachTestsV21 -nova.tests.unit.api.openstack.test_faults.TestFaultWrapper nova.tests.unit.api.test_compute_req_id.RequestIdTest nova.tests.unit.api.test_validator.ValidatorTestCase nova.tests.unit.api.test_wsgi.Test