return value of bucket.get_policy() is a bytes, so we need to decode it
before comparing it with a string, since the content of policy is ASCII,
it'd be suffice to decode it with 'ascii'.
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
ea63b52b1705e80977ce1fe6d2dc276ea9477344)
buckets, zone_bucket = create_bucket_per_zone_in_realm()
for _, bucket in zone_bucket:
bucket.set_policy(policy)
- assert(bucket.get_policy() == policy)
+ assert(bucket.get_policy().decode('ascii') == policy)
def test_bucket_sync_disable():
zonegroup = realm.master_zonegroup()