diff options
author | Takashi Natsume <takanattie@gmail.com> | 2020-05-14 15:01:28 +0000 |
---|---|---|
committer | Takashi Natsume <takanattie@gmail.com> | 2020-12-13 11:26:35 +0000 |
commit | 1cf2431f4bf815fc828a7878bd80f5f5bd8e8319 (patch) | |
tree | d493731db6a3bca4d6d7becb8f5cee594ce767be /nova/tests/unit/objects/test_host_mapping.py | |
parent | 383e2a8bdcc9210cbe9719d3470fe15b787d46b0 (diff) | |
download | nova-1cf2431f4bf815fc828a7878bd80f5f5bd8e8319.tar.gz |
Remove six.text_type (2/2)
Replace six.text_type with str.
This patch completes six removal.
Change-Id: I779bd1446dc1f070fa5100ccccda7881fa508d79
Implements: blueprint six-removal
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Diffstat (limited to 'nova/tests/unit/objects/test_host_mapping.py')
-rw-r--r-- | nova/tests/unit/objects/test_host_mapping.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/tests/unit/objects/test_host_mapping.py b/nova/tests/unit/objects/test_host_mapping.py index 7cbd9ae9c9..8917e318af 100644 --- a/nova/tests/unit/objects/test_host_mapping.py +++ b/nova/tests/unit/objects/test_host_mapping.py @@ -13,7 +13,6 @@ import mock from oslo_db import exception as db_exc from oslo_utils.fixture import uuidsentinel as uuids -import six from nova import context from nova import exception @@ -330,7 +329,7 @@ Found 1 unmapped computes in cell: %(cell)s""" % {'cell': uuids.cell1} exp = self.assertRaises(exception.HostMappingExists, host_mapping.discover_hosts, ctxt) expected = "Host 'bar' mapping already exists" - self.assertIn(expected, six.text_type(exp)) + self.assertIn(expected, str(exp)) @mock.patch('nova.objects.CellMappingList.get_all') @mock.patch('nova.objects.HostMapping.get_by_host') @@ -349,4 +348,4 @@ Found 1 unmapped computes in cell: %(cell)s""" % {'cell': uuids.cell1} host_mapping.discover_hosts, ctxt, by_service=True) expected = "Host 'bar' mapping already exists" - self.assertIn(expected, six.text_type(exp)) + self.assertIn(expected, str(exp)) |