Merge "Dropping explicit unicode literal"

This commit is contained in:
Zuul 2021-03-19 22:42:56 +00:00 committed by Gerrit Code Review
commit 2eb2a1040a
8 changed files with 32 additions and 32 deletions

View File

@ -1917,7 +1917,7 @@ class BackupsAPITestCase(test.TestCase):
self.assertEqual(backup.id, res_dict['restore']['backup_id'])
self.assertEqual(volume.id, res_dict['restore']['volume_id'])
self.assertEqual(volume_name, res_dict['restore']['volume_name'])
mock_restore_backup.assert_called_once_with(mock.ANY, u'testhost',
mock_restore_backup.assert_called_once_with(mock.ANY, 'testhost',
mock.ANY, volume.id)
# Manually check if restore_backup was called with appropriate backup.
self.assertEqual(backup.id, mock_restore_backup.call_args[0][2].id)

View File

@ -687,7 +687,7 @@ class ServicesTest(test.TestCase):
fakes.HTTPRequest.blank('v1/fake/os-services/disable-log-reason'))
body = {'host': 'host1',
'binary': 'cinder-scheduler',
'disabled_reason': u'test-reason',
'disabled_reason': 'test-reason',
}
res_dict = self.controller.update(req, "disable-log-reason", body)

View File

@ -148,7 +148,7 @@ class SnapshotManageTest(test.TestCase):
# correct arguments.
self.assertEqual(1, mock_rpcapi.call_count)
args = mock_rpcapi.call_args[0]
self.assertEqual({u'fake_key': u'fake_ref'}, args[3])
self.assertEqual({'fake_key': 'fake_ref'}, args[3])
@mock.patch(
'cinder.scheduler.rpcapi.SchedulerAPI.manage_existing_snapshot')

View File

@ -191,8 +191,8 @@ class VolumeTypesManageApiTest(test.TestCase):
mock_get.return_value = \
{'extra_specs': {"key1": "value1"},
'id': DEFAULT_VOLUME_TYPE,
'name': u'vol_type_1',
'description': u'vol_type_desc_%s' % DEFAULT_VOLUME_TYPE}
'name': 'vol_type_1',
'description': 'vol_type_desc_%s' % DEFAULT_VOLUME_TYPE}
mock_destroy.side_effect = return_volume_types_destroy
req = fakes.HTTPRequest.blank('/v2/%s/types/%s' %
@ -235,8 +235,8 @@ class VolumeTypesManageApiTest(test.TestCase):
mock_get_volume_type_by_name.return_value = \
{'extra_specs': {"key1": "value1"},
'id': DEFAULT_VOLUME_TYPE,
'name': u'vol_type_1',
'description': u''}
'name': 'vol_type_1',
'description': ''}
type_description = ""
body = {"volume_type": {"name": "vol_type_1",
@ -338,8 +338,8 @@ class VolumeTypesManageApiTest(test.TestCase):
mock_get_volume_type_by_name.return_value = \
{'extra_specs': {"key1": "value1"},
'id': DEFAULT_VOLUME_TYPE,
'name': u'vol_type_1',
'description': u'vol_type_desc_1'}
'name': 'vol_type_1',
'description': 'vol_type_desc_1'}
body = {"volume_type": {"name": "vol_type_1",
"os-volume-type-access:is_public": True,
@ -424,8 +424,8 @@ class VolumeTypesManageApiTest(test.TestCase):
self, mock_get_volume_type, mock_type_update):
mock_get_volume_type.return_value = \
{'id': DEFAULT_VOLUME_TYPE, 'name': u'vol_type_1',
'description': u''}
{'id': DEFAULT_VOLUME_TYPE, 'name': 'vol_type_1',
'description': ''}
type_description = ""
body = {"volume_type": {"description": type_description}}

View File

@ -818,30 +818,30 @@ class VolumeImageActionsTest(test.TestCase):
def fake_image_service_create(self, *args):
ret = {
'status': u'queued',
'name': u'image_name',
'status': 'queued',
'name': 'image_name',
'deleted': False,
'container_format': u'bare',
'container_format': 'bare',
'created_at': datetime.datetime(1, 1, 1, 1, 1, 1),
'disk_format': u'raw',
'disk_format': 'raw',
'updated_at': datetime.datetime(1, 1, 1, 1, 1, 1),
'id': fake.IMAGE_ID,
'min_ram': 0,
'checksum': None,
'min_disk': 0,
'deleted_at': None,
'properties': {u'x_billing_code_license': u'246254365'},
'properties': {'x_billing_code_license': '246254365'},
'size': 0}
return ret
def fake_image_service_create_with_params(self, *args):
ret = {
'status': u'queued',
'name': u'image_name',
'status': 'queued',
'name': 'image_name',
'deleted': False,
'container_format': u'bare',
'container_format': 'bare',
'created_at': datetime.datetime(1, 1, 1, 1, 1, 1),
'disk_format': u'raw',
'disk_format': 'raw',
'updated_at': datetime.datetime(1, 1, 1, 1, 1, 1),
'id': fake.IMAGE_ID,
'min_ram': 0,
@ -850,7 +850,7 @@ class VolumeImageActionsTest(test.TestCase):
'visibility': 'public',
'protected': True,
'deleted_at': None,
'properties': {u'x_billing_code_license': u'246254365'},
'properties': {'x_billing_code_license': '246254365'},
'size': 0}
return ret

View File

@ -30,7 +30,7 @@ from cinder.tests.unit import test
def generate_type(type_id, is_public):
return {
'id': type_id,
'name': u'test',
'name': 'test',
'deleted': False,
'created_at': datetime.datetime(2012, 1, 1, 1, 1, 1, 1),
'updated_at': None,

View File

@ -243,7 +243,7 @@ class ClustersTestCase(test.TestCase):
return_value=CLUSTERS_ORM[1])
def test_update_enable(self, get_mock, update_mock):
req = FakeRequest()
expected = {'cluster': {'name': u'cluster2',
expected = {'cluster': {'name': 'cluster2',
'binary': 'cinder-volume',
'state': 'down',
'status': 'enabled',
@ -266,7 +266,7 @@ class ClustersTestCase(test.TestCase):
def test_update_disable(self, get_mock, update_mock):
req = FakeRequest()
disabled_reason = 'For testing'
expected = {'cluster': {'name': u'cluster_name',
expected = {'cluster': {'name': 'cluster_name',
'state': 'up',
'binary': 'cinder-volume',
'status': 'disabled',

View File

@ -89,7 +89,7 @@ openstackdocs_repo_name = 'openstack/cinder'
openstackdocs_bug_project = 'cinder'
openstackdocs_bug_tag = 'doc'
openstackdocs_pdf_link = True
copyright = u'2010-present, OpenStack Foundation'
copyright = '2010-present, OpenStack Foundation'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -129,13 +129,13 @@ modindex_common_prefix = ['cinder.']
# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
# List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual'
man_pages = [
('cli/cinder-manage', 'cinder-manage', u'Cloud controller fabric',
[u'OpenStack'], 1),
('cli/cinder-status', 'cinder-status', u'Upgrade checking utility',
[u'OpenStack'], 1),
('cli/cinder-manage', 'cinder-manage', 'Cloud controller fabric',
['OpenStack'], 1),
('cli/cinder-status', 'cinder-status', 'Upgrade checking utility',
['OpenStack'], 1),
]
# -- Options for HTML output --------------------------------------------------
@ -228,8 +228,8 @@ htmlhelp_basename = 'cinderdoc'
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'doc-cinder.tex', u'Cinder Documentation',
u'Cinder Contributors', 'manual'),
('index', 'doc-cinder.tex', 'Cinder Documentation',
'Cinder Contributors', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of