Python3: base64.b64encode expects bytes.
This fixes barbican.tests.plugin.test_resource. Partially implements: blueprint barbican-py3 Change-Id: I6aedd864c3e57bf55ee7c31a99ba806d8e203b33
This commit is contained in:
parent
71561316c7
commit
a9d9055222
|
@ -85,7 +85,7 @@ class WhenTestingPluginResource(testtools.TestCase,
|
|||
def test_store_secret_dto(self):
|
||||
spec = {'algorithm': 'AES', 'bit_length': 256,
|
||||
'secret_type': 'symmetric'}
|
||||
secret = base64.b64encode('ABCDEFABCDEFABCDEFABCDEF')
|
||||
secret = base64.b64encode(b'ABCDEFABCDEFABCDEFABCDEF')
|
||||
|
||||
self.plugin_resource.store_secret(
|
||||
unencrypted_raw=secret,
|
||||
|
@ -145,7 +145,7 @@ class WhenTestingPluginResource(testtools.TestCase,
|
|||
self.moc_plugin.get_secret.side_effect = (
|
||||
mock_secret_store_get_secret)
|
||||
|
||||
raw_secret = 'ABCDEFABCDEFABCDEFABCDEF'
|
||||
raw_secret = b'ABCDEFABCDEFABCDEFABCDEF'
|
||||
spec = {'name': 'testsecret', 'algorithm': 'AES', 'bit_length': 256,
|
||||
'secret_type': 'symmetric'}
|
||||
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -52,6 +52,7 @@ commands =
|
|||
barbican.tests.plugin.crypto.test_manager \
|
||||
barbican.tests.plugin.interface.test_certificate_manager \
|
||||
barbican.tests.plugin.interface.test_secret_store \
|
||||
barbican.tests.plugin.test_resource \
|
||||
barbican.tests.plugin.test_simple_certificate_manager \
|
||||
barbican.tests.plugin.util.test_mime_types \
|
||||
barbican.tests.plugin.util.test_utils \
|
||||
|
|
Loading…
Reference in New Issue