From: Casey Bodley Date: Thu, 21 Sep 2023 14:00:37 +0000 (-0400) Subject: boto2: fix byte vs. string comparison in verify_object X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b1efd0477a0357996e6fa8d75baf33b005237d5c;p=s3-tests.git boto2: fix byte vs. string comparison in verify_object the storage class tests were failing on comparisons between the input data and output data: AssertionError: assert 'oFbdZvtRj' == b'oFbdZvtRj' convert the byte representation back to string for comparison Signed-off-by: Casey Bodley --- diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index cc70c246..0496f3a6 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -290,7 +290,7 @@ def verify_object(bucket, k, data=None, storage_class=None): if data: read_data = k.get_contents_as_string() - equal = data == read_data # avoid spamming log if data not equal + equal = data == read_data.decode() # avoid spamming log if data not equal assert equal == True def copy_object_storage_class(src_bucket, src_key, dest_bucket, dest_key, storage_class):