diff options
Diffstat (limited to 'functionaltests/client/v1/smoke')
-rw-r--r-- | functionaltests/client/v1/smoke/test_containers.py | 10 | ||||
-rw-r--r-- | functionaltests/client/v1/smoke/test_secrets.py | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/functionaltests/client/v1/smoke/test_containers.py b/functionaltests/client/v1/smoke/test_containers.py index 584df47..28792b7 100644 --- a/functionaltests/client/v1/smoke/test_containers.py +++ b/functionaltests/client/v1/smoke/test_containers.py @@ -20,11 +20,11 @@ from testtools import testcase create_secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==", + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", } @@ -114,7 +114,7 @@ class ContainersTestCase(base.TestCase): @utils.parameterized_dataset({ 'alphanumeric': ['a2j3j6ll9'], 'punctuation': ['~!@#$%^&*()_+`-={}[]|:;<>,.?'], - 'len_255': [str(bytearray().zfill(255))], + 'len_255': ['a' * 255], 'uuid': ['54262d9d-4bc7-4821-8df0-dc2ca8e112bb'], 'empty': [''] }) @@ -137,7 +137,7 @@ class ContainersTestCase(base.TestCase): self.assertEqual(container_ref, container_resp.container_ref) get_resp_secret_refs = [] - for name, ref in container_resp.secret_refs.iteritems(): + for name, ref in container_resp.secret_refs.items(): get_resp_secret_refs.append(str(ref)) # Verify the secret refs in the response @@ -164,7 +164,7 @@ class ContainersTestCase(base.TestCase): self.assertEqual(container_ref, container_resp.container_ref) get_resp_secret_refs = [] - for name, ref in container_resp.secret_refs.iteritems(): + for name, ref in container_resp.secret_refs.items(): get_resp_secret_refs.append(str(ref)) # Verify the secret refs in the response self.assertEqual(3, len(container_resp.secret_refs)) diff --git a/functionaltests/client/v1/smoke/test_secrets.py b/functionaltests/client/v1/smoke/test_secrets.py index 3f11740..0b9e358 100644 --- a/functionaltests/client/v1/smoke/test_secrets.py +++ b/functionaltests/client/v1/smoke/test_secrets.py @@ -21,11 +21,11 @@ from testtools import testcase secret_create_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==" + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==" } secret_create_nones_data = { @@ -34,7 +34,7 @@ secret_create_nones_data = { "algorithm": None, "bit_length": None, "mode": None, - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==", + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", } @@ -65,8 +65,8 @@ class SecretsTestCase(base.TestCase): 'symmetric': ['symmetric', 'aes', 128, - ('\x00\x01\x02\x03\x04\x05\x06\x07' - '\x00\x01\x02\x03\x04\x05\x06\x07')], + (b'\x00\x01\x02\x03\x04\x05\x06\x07' + b'\x00\x01\x02\x03\x04\x05\x06\x07')], 'private': ['private', 'rsa', 2048, |