From a20d75864264d69f1707b462f8369d09e08a3473 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 16 Jun 2017 13:38:38 -0400 Subject: [PATCH] Add a zero chunk test to cloud storage --- test/test_cloud_storage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_cloud_storage.py b/test/test_cloud_storage.py index 50cfa6c1c..b46bd44c4 100644 --- a/test/test_cloud_storage.py +++ b/test/test_cloud_storage.py @@ -84,6 +84,9 @@ class TestCloudStorage(unittest.TestCase): self.engine.stream_write(_TEST_PATH, StringIO(new_data), content_type='Cool/Type') self.assertEquals(new_data, self.engine.get_content(_TEST_PATH)) + def test_chunked_upload_no_chunks(self): + self._chunk_upload_test(0) + def test_chunked_upload_single_chunk(self): self._chunk_upload_test(1) @@ -114,7 +117,7 @@ class TestCloudStorage(unittest.TestCase): self.assertEquals(index + 1, len(metadata[_CHUNKS_KEY])) # Complete the chunked upload. - self.engine.complete_chunked_upload(upload_id, 'some/chunked/path', new_metadata, + self.engine.complete_chunked_upload(upload_id, 'some/chunked/path', metadata, force_client_side=force_client_side) # Ensure the file contents are valid.