summaryrefslogtreecommitdiff
path: root/functionaltests/client/v1/smoke/test_containers.py
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2020-04-20 17:48:17 +0900
committerDouglas Mendizábal <dmendiza@redhat.com>2020-06-08 15:40:22 -0500
commit6420da336083d936da9a4563149b08d785d70c84 (patch)
tree9cf7c2ce2cff5e7352d7b35a1dcee3bf675534e4 /functionaltests/client/v1/smoke/test_containers.py
parente5fdd10f04488d6f6e252a63c57bf2be92a06c8f (diff)
downloadpython-barbicanclient-6420da336083d936da9a4563149b08d785d70c84.tar.gz
Fix gate job failures and py3 compatibility
- Fix incorrect type handling of secret payload in py3 (it should be bytes instead of str by default) - Fix py3 compatibility of test codes - Update expiration date so that resources are created with valid expiration. Change-Id: I4935f601f87e9c49499da1034a320eee2e655b4d
Diffstat (limited to 'functionaltests/client/v1/smoke/test_containers.py')
-rw-r--r--functionaltests/client/v1/smoke/test_containers.py10
1 files changed, 5 insertions, 5 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))