test_s3: fix test_list_multipart_upload

test wasn't really testing what it should have

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2013-02-19 17:58:54 -08:00
parent d4978eb4d1
commit fd33286494

View file

@ -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()