test_s3: key.set_contents_from_file() rewind on dual write

This fixes a failure with boto 2.4.0.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2012-05-16 13:32:33 -07:00
parent adabd0ba7d
commit f1f86a0de0

View file

@ -3143,7 +3143,7 @@ def _test_atomic_dual_write(file_size):
# but before we're done, try to write all A's
fp_a = FakeWriteFile(file_size, 'A')
fp_b = FakeWriteFile(file_size, 'B',
lambda: key2.set_contents_from_file(fp_a)
lambda: key2.set_contents_from_file(fp_a, rewind=True)
)
key.set_contents_from_file(fp_b)