summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlikui <likui@yovole.com>2021-01-03 13:03:32 +0800
committerlikui <likui@yovole.com>2021-01-03 13:03:32 +0800
commit3bdae37673376529c622452f2f29a0d389c0a7d5 (patch)
tree9a0df04c12ecdfc419fd92257aec16b30773b85c
parent182301ac681d7f8e1e00a8163f6ac301aad9522b (diff)
downloadpython-troveclient-3bdae37673376529c622452f2f29a0d389c0a7d5.tar.gz
remove unicode from code
Change-Id: Iadc87779bf513c9d04847b6cf8ecbc60b300d7db Implements: blueprint remove-unicode
-rw-r--r--doc/source/conf.py6
-rw-r--r--releasenotes/source/conf.py16
-rw-r--r--troveclient/tests/test_shell.py46
3 files changed, 34 insertions, 34 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 5443c2d..16656b3 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -56,7 +56,7 @@ source_suffix = '.rst'
master_doc = 'index'
-copyright = u'2014, OpenStack Foundation'
+copyright = '2014, OpenStack Foundation'
exclude_trees = []
@@ -64,6 +64,6 @@ pygments_style = 'native'
htmlhelp_basename = 'python-troveclientdoc'
latex_documents = [
- ('index', 'python-troveclient.tex', u'python-troveclient Documentation',
- u'OpenStack', 'manual'),
+ ('index', 'python-troveclient.tex', 'python-troveclient Documentation',
+ 'OpenStack', 'manual'),
]
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 19ff472..9ed1b97 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -54,8 +54,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'Trove Client Release Notes'
-copyright = u'2016, Trove developers'
+project = 'Trove Client Release Notes'
+copyright = '2016, Trove developers'
# Release notes are version independent.
# The short X.Y version.
@@ -204,8 +204,8 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- ('index', 'TroveClientReleaseNotes.tex', u'Trove Client Release Notes Documentation',
- u'Trove developers', 'manual'),
+ ('index', 'TroveClientReleaseNotes.tex', 'Trove Client Release Notes Documentation',
+ 'Trove developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -234,8 +234,8 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'troveclientreleasenotes', u'Trove Client Release Notes Documentation',
- [u'Trove developers'], 1)
+ ('index', 'troveclientreleasenotes', 'Trove Client Release Notes Documentation',
+ ['Trove developers'], 1)
]
# If true, show URL addresses after external links.
@@ -248,8 +248,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'TroveClientReleaseNotes', u'Trove Client Release Notes Documentation',
- u'Trove developers', 'TroveClientReleaseNotes', 'OpenStack Database as a Service.',
+ ('index', 'TroveClientReleaseNotes', 'Trove Client Release Notes Documentation',
+ 'Trove developers', 'TroveClientReleaseNotes', 'OpenStack Database as a Service.',
'Miscellaneous'),
]
diff --git a/troveclient/tests/test_shell.py b/troveclient/tests/test_shell.py
index 52973e1..b062c8a 100644
--- a/troveclient/tests/test_shell.py
+++ b/troveclient/tests/test_shell.py
@@ -65,8 +65,8 @@ def _create_ver_list(versions):
class ShellTest(testtools.TestCase):
- version_id = u'v2.0'
- links = [{u'href': u'http://no.where/v2.0', u'rel': u'self'}]
+ version_id = 'v2.0'
+ links = [{'href': 'http://no.where/v2.0', 'rel': 'self'}]
v2_version = fixture.V2Discovery(V2_URL)
v2_version.updated_str = UPDATED
@@ -162,8 +162,8 @@ class ShellTest(testtools.TestCase):
self.fail('CommandError not raised')
@mock.patch('keystoneauth1.discover.get_version_data',
- return_value=[{u'status': u'stable', u'id': version_id,
- u'links': links}])
+ return_value=[{'status': 'stable', 'id': version_id,
+ 'links': links}])
@mock.patch('troveclient.v1.datastores.DatastoreVersions.list')
@requests_mock.Mocker()
def test_datastore_version_list(self, mock_discover,
@@ -183,8 +183,8 @@ class ShellTest(testtools.TestCase):
self.assertEqual(expected, (stdout + stderr))
@mock.patch('keystoneauth1.discover.get_version_data',
- return_value=[{u'status': u'stable', u'id': version_id,
- u'links': links}])
+ return_value=[{'status': 'stable', 'id': version_id,
+ 'links': links}])
@mock.patch('troveclient.v1.datastores.Datastores.list')
@requests_mock.Mocker()
def test_get_datastore_list(self, mock_discover,
@@ -206,8 +206,8 @@ class ShellTest(testtools.TestCase):
class ShellTestKeystoneV3(ShellTest):
- version_id = u'v3'
- links = [{u'href': u'http://no.where/v3', u'rel': u'self'}]
+ version_id = 'v3'
+ links = [{'href': 'http://no.where/v3', 'rel': 'self'}]
v3_version = fixture.V3Discovery(V3_URL)
v3_version.updated_str = UPDATED
@@ -282,15 +282,15 @@ class ShellTestKeystoneV3(ShellTest):
def test_no_project_id(self):
required = (
- u'You must provide a '
- u'project_id or project_name (with '
- u'project_domain_name or project_domain_id) via '
- u' --os-project-id (env[OS_PROJECT_ID])'
- u' --os-project-name (env[OS_PROJECT_NAME]),'
- u' --os-project-domain-id '
- u'(env[OS_PROJECT_DOMAIN_ID])'
- u' --os-project-domain-name '
- u'(env[OS_PROJECT_DOMAIN_NAME])'
+ 'You must provide a '
+ 'project_id or project_name (with '
+ 'project_domain_name or project_domain_id) via '
+ ' --os-project-id (env[OS_PROJECT_ID])'
+ ' --os-project-name (env[OS_PROJECT_NAME]),'
+ ' --os-project-domain-id '
+ '(env[OS_PROJECT_DOMAIN_ID])'
+ ' --os-project-domain-name '
+ '(env[OS_PROJECT_DOMAIN_NAME])'
)
self.make_env(exclude='OS_PROJECT_ID')
try:
@@ -301,8 +301,8 @@ class ShellTestKeystoneV3(ShellTest):
self.fail('CommandError not raised')
@mock.patch('keystoneauth1.discover.get_version_data',
- return_value=[{u'status': u'stable', u'id': version_id,
- u'links': links}])
+ return_value=[{'status': 'stable', 'id': version_id,
+ 'links': links}])
@mock.patch('troveclient.v1.datastores.DatastoreVersions.list')
@requests_mock.Mocker()
def test_datastore_version_list(self, mock_discover,
@@ -323,8 +323,8 @@ class ShellTestKeystoneV3(ShellTest):
self.assertEqual(expected, (stdout + stderr))
@mock.patch('keystoneauth1.discover.get_version_data',
- return_value=[{u'status': u'stable', u'id': version_id,
- u'links': links}])
+ return_value=[{'status': 'stable', 'id': version_id,
+ 'links': links}])
@mock.patch('troveclient.v1.datastores.Datastores.list')
@requests_mock.Mocker()
def test_get_datastore_list(self, mock_discover,
@@ -345,8 +345,8 @@ class ShellTestKeystoneV3(ShellTest):
self.assertEqual(expected, (stdout + stderr))
@mock.patch('keystoneauth1.discover.get_version_data',
- return_value=[{u'status': u'stable', u'id': version_id,
- u'links': links}])
+ return_value=[{'status': 'stable', 'id': version_id,
+ 'links': links}])
@requests_mock.Mocker()
def test_invalid_client_version(self, mock_discover,
mock_requests):