Add full unit tests for the file-like objects and fix them

Fixes #568
This commit is contained in:
Joseph Schorr 2015-09-30 14:19:25 -04:00
parent 78e8aefd45
commit a3ebb9028d
3 changed files with 191 additions and 34 deletions

View file

@ -305,7 +305,7 @@ class SwiftStorage(BaseStorage):
self.stream_write(segment_path, limiting_fp)
# We are only going to track keys to which data was confirmed written.
bytes_written = limiting_fp.byte_count_read
bytes_written = limiting_fp.tell()
if bytes_written > 0:
updated_metadata[_SEGMENTS_KEY].append(_PartUploadMetadata(segment_path, offset,
bytes_written))