Remove unnecessary unicode prefixes
Change-Id: I87ee686a86be738ee96edf647a33fc3ce0510853
This commit is contained in:
parent
57fb686b20
commit
b73046ff74
@ -45,13 +45,13 @@ source_suffix = '.rst'
|
|||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'Key Manager API Guide'
|
project = 'Key Manager API Guide'
|
||||||
openstackdocs_bug_tag = u'api-guide'
|
openstackdocs_bug_tag = 'api-guide'
|
||||||
openstackdocs_repo_name = 'openstack/barbican'
|
openstackdocs_repo_name = 'openstack/barbican'
|
||||||
openstackdocs_auto_name = False
|
openstackdocs_auto_name = False
|
||||||
openstackdocs_bug_project = 'barbican'
|
openstackdocs_bug_project = 'barbican'
|
||||||
|
|
||||||
copyright = u'2016, OpenStack contributors'
|
copyright = '2016, OpenStack contributors'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
@ -190,8 +190,8 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'KeyManagerAPI.tex', u'Key Manager API Documentation',
|
('index', 'KeyManagerAPI.tex', 'Key Manager API Documentation',
|
||||||
u'OpenStack contributors', 'manual'),
|
'OpenStack contributors', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
@ -220,8 +220,8 @@ latex_documents = [
|
|||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
('index', 'keymanagerapi', u'Key Manager API Documentation',
|
('index', 'keymanagerapi', 'Key Manager API Documentation',
|
||||||
[u'OpenStack contributors'], 1)
|
['OpenStack contributors'], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
# If true, show URL addresses after external links.
|
||||||
@ -234,8 +234,8 @@ man_pages = [
|
|||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
('index', 'KeyManagerAPIGuide', u'Key Manager API Guide',
|
('index', 'KeyManagerAPIGuide', 'Key Manager API Guide',
|
||||||
u'OpenStack contributors', 'APIGuide',
|
'OpenStack contributors', 'APIGuide',
|
||||||
'This guide teaches OpenStack Key Manager service users concepts about '
|
'This guide teaches OpenStack Key Manager service users concepts about '
|
||||||
'managing keys in an OpenStack cloud with the Key Manager API.',
|
'managing keys in an OpenStack cloud with the Key Manager API.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
@ -259,6 +259,6 @@ locale_dirs = ['locale/']
|
|||||||
# -- Options for PDF output --------------------------------------------------
|
# -- Options for PDF output --------------------------------------------------
|
||||||
|
|
||||||
pdf_documents = [
|
pdf_documents = [
|
||||||
('index', u'KeyManagerAPIGuide', u'Key Manager API Guide', u'OpenStack '
|
('index', 'KeyManagerAPIGuide', 'Key Manager API Guide', 'OpenStack '
|
||||||
'contributors')
|
'contributors')
|
||||||
]
|
]
|
||||||
|
@ -130,7 +130,7 @@ class NotificationTask(object):
|
|||||||
"""Gets project resource identifier from payload
|
"""Gets project resource identifier from payload
|
||||||
|
|
||||||
Sample payload is provided below::
|
Sample payload is provided below::
|
||||||
{'resource_info': u'2b99a94ad02741978e613fb52dd1f4cd'}
|
{'resource_info': '2b99a94ad02741978e613fb52dd1f4cd'}
|
||||||
"""
|
"""
|
||||||
if payload_s:
|
if payload_s:
|
||||||
return payload_s.get('resource_info')
|
return payload_s.get('resource_info')
|
||||||
|
@ -150,8 +150,8 @@ class WhenGettingTransKeysListUsingTransportKeysResource(FunctionalTest):
|
|||||||
|
|
||||||
self.repo.get_by_create_date.assert_called_once_with(
|
self.repo.get_by_create_date.assert_called_once_with(
|
||||||
plugin_name=None,
|
plugin_name=None,
|
||||||
offset_arg=u'{0}'.format(self.offset),
|
offset_arg='{0}'.format(self.offset),
|
||||||
limit_arg=u'{0}'.format(self.limit),
|
limit_arg='{0}'.format(self.limit),
|
||||||
suppress_exception=True
|
suppress_exception=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -185,8 +185,8 @@ class WhenGettingTransKeysListUsingTransportKeysResource(FunctionalTest):
|
|||||||
|
|
||||||
self.repo.get_by_create_date.assert_called_once_with(
|
self.repo.get_by_create_date.assert_called_once_with(
|
||||||
plugin_name=None,
|
plugin_name=None,
|
||||||
offset_arg=u'{0}'.format(self.offset),
|
offset_arg='{0}'.format(self.offset),
|
||||||
limit_arg=u'{0}'.format(self.limit),
|
limit_arg='{0}'.format(self.limit),
|
||||||
suppress_exception=True
|
suppress_exception=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class WhenTestingQuotaDriverFunctions(database_utils.RepositoryTestCase):
|
|||||||
self.create_a_test_project_quotas()
|
self.create_a_test_project_quotas()
|
||||||
project_quotas = self.quota_driver.get_project_quotas_list()
|
project_quotas = self.quota_driver.get_project_quotas_list()
|
||||||
self.assertEqual({'project_quotas': [{
|
self.assertEqual({'project_quotas': [{
|
||||||
'project_id': u'project1',
|
'project_id': 'project1',
|
||||||
'project_quotas': {'consumers': 105,
|
'project_quotas': {'consumers': 105,
|
||||||
'containers': 103,
|
'containers': 103,
|
||||||
'orders': 102,
|
'orders': 102,
|
||||||
|
@ -103,9 +103,9 @@ class WhenTestingValidatorsFunctions(utils.BaseTestCase):
|
|||||||
self.assertTrue(is_too_big)
|
self.assertTrue(is_too_big)
|
||||||
|
|
||||||
def test_secret_too_big_is_true_for_big_unicode_secrets(self):
|
def test_secret_too_big_is_true_for_big_unicode_secrets(self):
|
||||||
beer = u'\U0001F37A'
|
beer = '\U0001F37A'
|
||||||
data = beer * (validators.CONF.max_allowed_secret_in_bytes // 4)
|
data = beer * (validators.CONF.max_allowed_secret_in_bytes // 4)
|
||||||
data += u'1'
|
data += '1'
|
||||||
|
|
||||||
is_too_big = validators.secret_too_big(data)
|
is_too_big = validators.secret_too_big(data)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class WhenTestingOrderRetryTaskRepository(database_utils.RepositoryTestCase):
|
|||||||
self.assertEqual(order_retry_task.id, order_retry_task_from_get.id)
|
self.assertEqual(order_retry_task.id, order_retry_task_from_get.id)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.date_time_now, order_retry_task_from_get.retry_at)
|
self.date_time_now, order_retry_task_from_get.retry_at)
|
||||||
self.assertEqual(u'retry-task', order_retry_task_from_get.retry_task)
|
self.assertEqual('retry-task', order_retry_task_from_get.retry_task)
|
||||||
self.assertEqual(self.test_args, order_retry_task_from_get.retry_args)
|
self.assertEqual(self.test_args, order_retry_task_from_get.retry_args)
|
||||||
self.assertEqual(self.test_kwargs,
|
self.assertEqual(self.test_kwargs,
|
||||||
order_retry_task_from_get.retry_kwargs)
|
order_retry_task_from_get.retry_kwargs)
|
||||||
@ -88,7 +88,7 @@ class WhenTestingOrderRetryTaskRepository(database_utils.RepositoryTestCase):
|
|||||||
order_retry_task_from_get = entities[0]
|
order_retry_task_from_get = entities[0]
|
||||||
self.assertEqual(order_retry_task.id, order_retry_task_from_get.id)
|
self.assertEqual(order_retry_task.id, order_retry_task_from_get.id)
|
||||||
self.assertEqual(date_time_future, order_retry_task_from_get.retry_at)
|
self.assertEqual(date_time_future, order_retry_task_from_get.retry_at)
|
||||||
self.assertEqual(u'retry-task', order_retry_task_from_get.retry_task)
|
self.assertEqual('retry-task', order_retry_task_from_get.retry_task)
|
||||||
self.assertEqual(self.test_args, order_retry_task_from_get.retry_args)
|
self.assertEqual(self.test_args, order_retry_task_from_get.retry_args)
|
||||||
self.assertEqual(self.test_kwargs,
|
self.assertEqual(self.test_kwargs,
|
||||||
order_retry_task_from_get.retry_kwargs)
|
order_retry_task_from_get.retry_kwargs)
|
||||||
@ -120,7 +120,7 @@ class WhenTestingOrderRetryTaskRepository(database_utils.RepositoryTestCase):
|
|||||||
|
|
||||||
order_retry_task = models.OrderRetryTask()
|
order_retry_task = models.OrderRetryTask()
|
||||||
order_retry_task.order_id = order.id
|
order_retry_task.order_id = order.id
|
||||||
order_retry_task.retry_task = u'retry-task'
|
order_retry_task.retry_task = 'retry-task'
|
||||||
order_retry_task.retry_at = retry_at or self.date_time_now
|
order_retry_task.retry_at = retry_at or self.date_time_now
|
||||||
order_retry_task.retry_args = self.test_args
|
order_retry_task.retry_args = self.test_args
|
||||||
order_retry_task.retry_kwargs = self.test_kwargs
|
order_retry_task.retry_kwargs = self.test_kwargs
|
||||||
|
@ -42,7 +42,7 @@ class WhenTestingSimpleCryptoPlugin(utils.BaseTestCase):
|
|||||||
return self.plugin.bind_kek_metadata(kek_meta_dto)
|
return self.plugin.bind_kek_metadata(kek_meta_dto)
|
||||||
|
|
||||||
def test_encrypt_unicode_raises_value_error(self):
|
def test_encrypt_unicode_raises_value_error(self):
|
||||||
unencrypted = u'unicode_beer\U0001F37A'
|
unencrypted = 'unicode_beer\U0001F37A'
|
||||||
encrypt_dto = plugin.EncryptDTO(unencrypted)
|
encrypt_dto = plugin.EncryptDTO(unencrypted)
|
||||||
secret = mock.MagicMock()
|
secret = mock.MagicMock()
|
||||||
secret.mime_type = 'text/plain'
|
secret.mime_type = 'text/plain'
|
||||||
|
@ -474,7 +474,7 @@ class WhenTestingPKCS11(utils.BaseTestCase):
|
|||||||
self.pkcs11._check_error, 0xe0)
|
self.pkcs11._check_error, 0xe0)
|
||||||
|
|
||||||
def test_converting_unicode_to_bytes(self):
|
def test_converting_unicode_to_bytes(self):
|
||||||
self.assertEqual(b'foo', pkcs11._to_bytes(u'foo'))
|
self.assertEqual(b'foo', pkcs11._to_bytes('foo'))
|
||||||
|
|
||||||
def test_converting_default_str_type_to_bytes(self):
|
def test_converting_default_str_type_to_bytes(self):
|
||||||
self.assertEqual(b'foo', pkcs11._to_bytes('foo'))
|
self.assertEqual(b'foo', pkcs11._to_bytes('foo'))
|
||||||
|
@ -68,7 +68,7 @@ Verify operation of the Key Manager (barbican) service.
|
|||||||
| Name | mysecret |
|
| Name | mysecret |
|
||||||
| Created | 2016-08-16 16:04:10+00:00 |
|
| Created | 2016-08-16 16:04:10+00:00 |
|
||||||
| Status | ACTIVE |
|
| Status | ACTIVE |
|
||||||
| Content types | {u'default': u'application/octet-stream'} |
|
| Content types | {'default': 'application/octet-stream'} |
|
||||||
| Algorithm | aes |
|
| Algorithm | aes |
|
||||||
| Bit length | 256 |
|
| Bit length | 256 |
|
||||||
| Secret type | opaque |
|
| Secret type | opaque |
|
||||||
|
@ -465,7 +465,7 @@ class SecretsTestCase(base.TestCase):
|
|||||||
|
|
||||||
Launchpad bug #1315498
|
Launchpad bug #1315498
|
||||||
"""
|
"""
|
||||||
data = u'\U0001F37A'
|
data = '\U0001F37A'
|
||||||
data = data.encode('utf-8')
|
data = data.encode('utf-8')
|
||||||
test_model = secret_models.SecretModel(
|
test_model = secret_models.SecretModel(
|
||||||
**self.default_secret_create_two_phase_data)
|
**self.default_secret_create_two_phase_data)
|
||||||
@ -1034,16 +1034,16 @@ class SecretsTestCase(base.TestCase):
|
|||||||
|
|
||||||
@utils.parameterized_dataset({
|
@utils.parameterized_dataset({
|
||||||
'invalid_http_content_type_characaters_latin': {
|
'invalid_http_content_type_characaters_latin': {
|
||||||
'http_content_type': u'\u00c4'.encode('utf-8')},
|
'http_content_type': '\u00c4'.encode('utf-8')},
|
||||||
|
|
||||||
'invalid_http_content_type_characaters_arabic': {
|
'invalid_http_content_type_characaters_arabic': {
|
||||||
'http_content_type': u'\u060f'.encode('utf-8')},
|
'http_content_type': '\u060f'.encode('utf-8')},
|
||||||
|
|
||||||
'invalid_http_content_type_characaters_cyrillic': {
|
'invalid_http_content_type_characaters_cyrillic': {
|
||||||
'http_content_type': u'\u0416'.encode('utf-8')},
|
'http_content_type': '\u0416'.encode('utf-8')},
|
||||||
|
|
||||||
'invalid_http_content_type_characaters_replacement_character': {
|
'invalid_http_content_type_characaters_replacement_character': {
|
||||||
'http_content_type': u'\ufffd'.encode('utf-8')},
|
'http_content_type': '\ufffd'.encode('utf-8')},
|
||||||
})
|
})
|
||||||
@testcase.attr('negative')
|
@testcase.attr('negative')
|
||||||
def test_secret_create_with_invalid_http_content_type_characters(
|
def test_secret_create_with_invalid_http_content_type_characters(
|
||||||
@ -1062,16 +1062,16 @@ class SecretsTestCase(base.TestCase):
|
|||||||
|
|
||||||
@utils.parameterized_dataset({
|
@utils.parameterized_dataset({
|
||||||
'invalid_http_content_type_characaters_latin': {
|
'invalid_http_content_type_characaters_latin': {
|
||||||
'payload_content_type': u'\u00c4'.encode('utf-8')},
|
'payload_content_type': '\u00c4'.encode('utf-8')},
|
||||||
|
|
||||||
'invalid_http_content_type_characaters_arabic': {
|
'invalid_http_content_type_characaters_arabic': {
|
||||||
'payload_content_type': u'\u060f'.encode('utf-8')},
|
'payload_content_type': '\u060f'.encode('utf-8')},
|
||||||
|
|
||||||
'invalid_http_content_type_characaters_cyrillic': {
|
'invalid_http_content_type_characaters_cyrillic': {
|
||||||
'payload_content_type': u'\u0416'.encode('utf-8')},
|
'payload_content_type': '\u0416'.encode('utf-8')},
|
||||||
|
|
||||||
'invalid_http_content_type_characaters_replacement_character': {
|
'invalid_http_content_type_characaters_replacement_character': {
|
||||||
'payload_content_type': u'\ufffd'.encode('utf-8')},
|
'payload_content_type': '\ufffd'.encode('utf-8')},
|
||||||
})
|
})
|
||||||
@testcase.attr('negative')
|
@testcase.attr('negative')
|
||||||
def test_secret_create_with_invalid_payload_content_type_characters(
|
def test_secret_create_with_invalid_payload_content_type_characters(
|
||||||
|
Loading…
Reference in New Issue
Block a user