]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
test_s3: fix test_list_multipart_upload
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 20 Feb 2013 01:58:54 +0000 (17:58 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Wed, 20 Feb 2013 02:00:15 +0000 (18:00 -0800)
test wasn't really testing what it should have

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
s3tests/functional/test_s3.py

index 29085cff3b59addc362f1855f16358aacd6a3c1f..0c3e23cf0f66a48b8cb5ac3cad5bb8acbfa20f14 100644 (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()