Skip to content

Instantly share code, notes, and snippets.

@clayg
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/eb77a5e69812b6ea25eb to your computer and use it in GitHub Desktop.
Save clayg/eb77a5e69812b6ea25eb to your computer and use it in GitHub Desktop.
diff --git a/test/unit/obj/test_reconstructor.py b/test/unit/obj/test_reconstructor.py
index 35ae976..1747426 100755
--- a/test/unit/obj/test_reconstructor.py
+++ b/test/unit/obj/test_reconstructor.py
@@ -2595,10 +2595,11 @@ class TestObjectReconstructor(unittest.TestCase):
etag = md5(test_data).hexdigest()
ec_archive_bodies = make_ec_archive_bodies(self.policy, test_data)
- # add a duplicate body to the list of EC archive bodies
- broken_body = ec_archive_bodies[1]
- ec_archive_bodies = ec_archive_bodies[:-1]
- ec_archive_bodies.append(broken_body)
+ broken_body = ec_archive_bodies.pop(1)
+ # add some duplicates
+ num_duplicates = self.policy.ec_nparity - 1
+ ec_archive_bodies = (ec_archive_bodies[:num_duplicates] +
+ ec_archive_bodies)[:-num_duplicates]
def make_header(body):
metadata = self.policy.pyeclib_driver.get_metadata(body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment