From: Yehuda Sadeh Date: Wed, 20 Feb 2013 01:58:54 +0000 (-0800) Subject: test_s3: fix test_list_multipart_upload X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd33286494a221030eb9128f446337e7f3cfdef9;p=s3-tests.git test_s3: fix test_list_multipart_upload test wasn't really testing what it should have Signed-off-by: Yehuda Sadeh --- diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 29085cff..0c3e23cf 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -3889,11 +3889,22 @@ def test_list_multipart_upload(): bucket = get_new_bucket() key="mymultipart" upload1 = _multipart_upload(bucket, key, 5, 1) - upload2 = _multipart_upload(bucket, key, 5, 1) + upload2 = _multipart_upload(bucket, key, 6, 1) key2="mymultipart2" upload3 = _multipart_upload(bucket, key2, 5, 1) + l = bucket.list_multipart_uploads() + l = list(l) + + index = dict([(key, 2), (key2, 1)]) + + for upload in l: + index[upload.key_name] -= 1; + + for k, c in index.items(): + eq(c, 0) + upload1.cancel_upload() upload2.cancel_upload() upload3.cancel_upload()