remove unicode from code

remove unicode from code

Change-Id: Iee0bca6009d0cd9edb66fc787bf8452ba9de253d
This commit is contained in:
shanyunfan33 2021-12-24 14:41:36 +08:00
parent 76b9a09591
commit 64b2f2bde0
6 changed files with 33 additions and 33 deletions

View File

@ -58,8 +58,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Networking API Reference'
copyright = u'2010-present, OpenStack Foundation'
project = 'Networking API Reference'
copyright = '2010-present, OpenStack Foundation'
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/neutron-lib'
@ -189,8 +189,8 @@ htmlhelp_basename = 'neutrondoc'
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'Neutron.tex', u'OpenStack Networking API Documentation',
u'OpenStack Foundation', 'manual'),
('index', 'Neutron.tex', 'OpenStack Networking API Documentation',
'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of

View File

@ -56,8 +56,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Neutron Library'
copyright = u'2015-present, OpenStack Foundation.'
project = 'Neutron Library'
copyright = '2015-present, OpenStack Foundation.'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -191,8 +191,8 @@ html_theme = 'openstackdocs'
# (source start file, target name, title, author,
# documentclass [howto/manual]).
latex_documents = [
('index', 'doc-neutron-lib.tex', u'Neutron Library Documentation',
u'Neutron development team', 'manual'),
('index', 'doc-neutron-lib.tex', 'Neutron Library Documentation',
'Neutron development team', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of

View File

@ -177,23 +177,23 @@ class TestConvertIPv6AddrCanonicalFormat(base.BaseTestCase):
def test_convert_ipv6_address_extended_add_with_zeroes(self):
result = converters.convert_ip_to_canonical_format(
u'2001:0db8:0:0:0:0:0:0001')
self.assertEqual(u'2001:db8::1', result)
'2001:0db8:0:0:0:0:0:0001')
self.assertEqual('2001:db8::1', result)
@testtools.skipIf(tools.is_bsd(), 'bug/1484837')
def test_convert_ipv6_compressed_address_OSX_skip(self):
result = converters.convert_ip_to_canonical_format(
u'2001:db8:0:1:1:1:1:1')
self.assertEqual(u'2001:db8:0:1:1:1:1:1', result)
'2001:db8:0:1:1:1:1:1')
self.assertEqual('2001:db8:0:1:1:1:1:1', result)
def test_convert_ipv6_extended_addr_to_compressed(self):
result = converters.convert_ip_to_canonical_format(
u"Fe80:0:0:0:0:0:0:1")
self.assertEqual(u'fe80::1', result)
self.assertEqual('fe80::1', result)
def test_convert_ipv4_address(self):
result = converters.convert_ip_to_canonical_format(u"192.168.1.1")
self.assertEqual(u'192.168.1.1', result)
self.assertEqual('192.168.1.1', result)
def test_convert_None_address(self):
result = converters.convert_ip_to_canonical_format(None)
@ -203,28 +203,28 @@ class TestConvertIPv6AddrCanonicalFormat(base.BaseTestCase):
result = converters.convert_ip_to_canonical_format("on")
self.assertEqual("on", result)
result = converters.convert_ip_to_canonical_format(
u'192.168.1.1/32')
self.assertEqual(u'192.168.1.1/32', result)
'192.168.1.1/32')
self.assertEqual('192.168.1.1/32', result)
result = converters.convert_ip_to_canonical_format(
u'2001:db8:0:1:1:1:1:1/128')
self.assertEqual(u'2001:db8:0:1:1:1:1:1/128', result)
'2001:db8:0:1:1:1:1:1/128')
self.assertEqual('2001:db8:0:1:1:1:1:1/128', result)
class TestConvertIPv6CIDRCanonicalFormat(base.BaseTestCase):
def test_convert_ipv4_address_with_CIDR(self):
result = converters.convert_cidr_to_canonical_format(u'192.168.1.1/24')
self.assertEqual(u'192.168.1.1/24', result)
result = converters.convert_cidr_to_canonical_format('192.168.1.1/24')
self.assertEqual('192.168.1.1/24', result)
def test_convert_ipv6_extended_addr_withcidr_to_compressed(self):
result = converters.convert_cidr_to_canonical_format(
u'Fe80:0:0:0:0:0:0:1/64')
self.assertEqual(u'fe80::1/64', result)
'Fe80:0:0:0:0:0:0:1/64')
self.assertEqual('fe80::1/64', result)
def test_convert_non_ip_addr_with_slash(self):
with testtools.ExpectedException(n_exc.InvalidInput):
converters.convert_cidr_to_canonical_format(
u"Dormamu/DarkSeid/Vulture")
"Dormamu/DarkSeid/Vulture")
class TestConvertStringToCaseInsensitive(base.BaseTestCase):

View File

@ -106,7 +106,7 @@ class TestDeadLockDecorator(_base.BaseTestCase):
retry_fixture.cleanUp()
def test_mysql_savepoint_error(self):
e = db_exc.DBError("(pymysql.err.InternalError) (1305, u'SAVEPOINT "
e = db_exc.DBError("(pymysql.err.InternalError) (1305, 'SAVEPOINT "
"sa_savepoint_1 does not exist')")
self.assertIsNone(self._decorated_function(1, e))

View File

@ -51,7 +51,7 @@ class TestPlacementUtils(base.BaseTestCase):
# assertNotRaises
place_utils.six_uuid5(
namespace=self._uuid_ns,
name=u'unicode string')
name='unicode string')
except Exception:
self.fail('could not generate uuid')

View File

@ -54,8 +54,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Neutron Library Release Notes'
copyright = u'2016, Neutron Library Developers'
project = 'Neutron Library Release Notes'
copyright = '2016, Neutron Library Developers'
# Release notes are version independent.
# The full version, including alpha/beta/rc tags.
@ -201,8 +201,8 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'NeutronLibReleaseNotes.tex',
u'Neutron Library Notes Documentation',
u'Neutron Library Developers', 'manual'),
'Neutron Library Notes Documentation',
'Neutron Library Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@ -231,9 +231,9 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'neutronlibreleasenotes', u'Neutron Library',
('index', 'neutronlibreleasenotes', 'Neutron Library',
'Neutron Library Release Notes Documentation',
[u'Neutron Library Developers'],
['Neutron Library Developers'],
1)
]
@ -247,9 +247,9 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'NeutronLibReleaseNotes', u'Neutron Library',
('index', 'NeutronLibReleaseNotes', 'Neutron Library',
'Neutron Library Release Notes Documentation',
u'Neutron Library Developers',
'Neutron Library Developers',
'NeutronLibReleaseNotes',
'For sharing/decoupling neutron functionality across the Stadium.',
'Miscellaneous'),