"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/unit/common/middleware/s3api/test_service.py" between
swift-2.19.1.tar.gz and swift-2.21.0.tar.gz

About: OpenStack swift is software for creating redundant, scalable object storage using clusters of commodity servers to store terabytes or even petabytes of accessible data (now supporting storage policies).
The "Stein" series (latest release).

test_service.py  (swift-2.19.1):test_service.py  (swift-2.21.0)
skipping to change at line 33 skipping to change at line 33
from test.unit.common.middleware.s3api import S3ApiTestCase from test.unit.common.middleware.s3api import S3ApiTestCase
from swift.common.middleware.s3api.etree import fromstring from swift.common.middleware.s3api.etree import fromstring
from swift.common.middleware.s3api.subresource import ACL, Owner, encode_acl from swift.common.middleware.s3api.subresource import ACL, Owner, encode_acl
def create_bucket_list_json(buckets): def create_bucket_list_json(buckets):
""" """
Create a json from bucket list Create a json from bucket list
:param buckets: a list of tuples (or lists) consist of elements orderd as :param buckets: a list of tuples (or lists) consist of elements orderd as
name, count, bytes name, count, bytes
""" """
bucket_list = map( bucket_list = [{'name': item[0], 'count': item[1], 'bytes': item[2]}
lambda item: {'name': item[0], 'count': item[1], 'bytes': item[2]}, for item in buckets]
list(buckets))
return json.dumps(bucket_list) return json.dumps(bucket_list)
class TestS3ApiService(S3ApiTestCase): class TestS3ApiService(S3ApiTestCase):
def setup_buckets(self): def setup_buckets(self):
self.buckets = (('apple', 1, 200), ('orange', 3, 430)) self.buckets = (('apple', 1, 200), ('orange', 3, 430))
bucket_list = create_bucket_list_json(self.buckets) bucket_list = create_bucket_list_json(self.buckets)
self.swift.register('GET', '/v1/AUTH_test', swob.HTTPOk, {}, self.swift.register('GET', '/v1/AUTH_test', swob.HTTPOk, {},
bucket_list) bucket_list)
def setUp(self): def setUp(self):
 End of changes. 1 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)